Hi all,
I am curious about an issue I encountered.
I have a field in the contract table called "Funded", and this one is based on the "Total funding" in the latest modification record.
So I used the function to get the target item.
This function worked before, but somehow it always gives me an error and the text box became empty recently.
Text(First(Sort(ThisItem.OptionModifications,'Mod Date',Descending)).'Total Funding',"[$-en-US]$#,###.00")
Then I tried to change it to Last, then it works...
Text(Last(Sort(ThisItem.OptionModifications,'Mod Date',Ascending)).'Total Funding',"[$-en-US]$#,###.00")
This function will turn out a correct number, and will not show an error.
Those two functions basically are the same idea, just opposite direction approach, I still can't figure out why this happened...
Is there any idea ? 🤔
Thanks!
@HCLin Maybe the First record has something with the Total Funding field that cannot be processed by the rest of the formula. For example, maybe that Record has blank value, or incorrect value, for that field. Check it and see if that's the reason.
I think here it is a problem of coincidence. If it happened to be the last record, Last would have given the same error.
Hi @poweractivate ,
Thanks for your reply!
It should not be the case, as you can see in the function, I used "Descending" to sort the items for "First", and used "Ascending" to sort the item for "Last", so basically they are the same item.
And I have also inputted the table to a gallery to check the items.
@HCLin Not sure why it is doing this.
Maybe try
Text(Value(First(Sort(ThisItem.OptionModifications,'Mod Date',Descending)).'Total Funding'),"[$-en-US]$#,###.00")
Doubt it would work just for that, but if for some reason it does, tell me.
To diagnose this further, I would add a label and inspect the value of the following.
First(Sort(ThisItem.OptionModifications,'Mod Date',Descending)).'Total Funding'
I'd then compare it with the value that you get when you call Last.
Last(Sort(ThisItem.OptionModifications,'Mod Date',Ascending)).'Total Funding'
Can you see any differences in these 2 values without the call to Text?
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
185 | |
53 | |
41 | |
36 | |
30 |
User | Count |
---|---|
242 | |
81 | |
71 | |
69 | |
65 |