web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Cannot Convert Record ...
Power Apps
Answered

Cannot Convert Record Value to Text/Number

(0) ShareShare
ReportReport
Posted on by 35

I have a Sharepoint List called ItemTotals in which I am attempting to look up a value based on a matching string, set that value to a variable. For the sake of this post, I assume I always return 1 record result, so no need to use FIRST or any type of record logic.

 

I've tried setting the actual field (currentCount) which is a number to the iCurrentQty Variable in order to make it a text type so I could then convert it to an int. My end result I'm trying to achieve for the currentQty is an Int. Any idea what I'm doing wrong here? Using  Value(iCurrentQty) after setting the variable gives me an error stating it requires a number / text  which makes me thing its still treating that as a record even though I called the specific column name.

 

Set(iCurrentQtyList,Filter(ItemTotals,Title = Dropdown1.SelectedText.Value));
Set(iCurrentQty,iCurrentQtyList.CurrentCount);
Set(iChangeQty, Value(DataCardValue10.Text));

 

--What I want to do eventually but need to cast the iCurrentQty to an int
Set(iNewQty, iCurrentQty + iChangeQty);

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @WO1 

    Please consider changing your Formula to the following:

    Set(iNewQty, LookUp(ItemTotals, Title = Dropdown1.Selected.Value, CurrentCount) + Value(DataCardValue10.Text))

     

    Your iNewQty will contain a numeric value of the sum of the existing record count and the new entered count.

     

    I hope this is helpful for you.

  • WO1 Profile Picture
    35 on at

    Perfect, Exactly what I needed. I should have used Lookup initially to get a discrete value rather than filter to get a record result.

     

    Thanks for the help.

  • mdevaney Profile Picture
    29,993 Moderator on at

    @WO1 
    Please mark the solution written by @RandyHayes if your issue if solved.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard