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);
Solved! Go to Solution.
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.
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.
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.
User | Count |
---|---|
252 | |
104 | |
94 | |
50 | |
39 |