Search code examples
powerapps

Powerapps : datasource result in text field


My question is : how to find and write my title where ID is max. I want something like that : Filter(Budget2.ID;Max(ID))

And second question : I can't use Filter with a text field. How can I write my title in the text field ?

I have : ID Name 1 TOTO01 2 TOTO02 3 TOTO03

I want my formula to give me : TOTO03 as a result, in a text field.

Thanks !


Solution

  • You want something like the expression below:

    LookUp(
        Budget2;
        ID = Max(Budget2; ID);
        Title)
    

    Filter will return you a table (list of items), so you cannot use it directly in a label / text field. LookUp will return a single record, and if you use the third argument (column name) it will extract the value for that column.

    The expression above is looking for a single record, where the ID is the maximum id for that table, and extracting the Title column from it.