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 Apps
Answered

record selection

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

how can i make an if condition to compare between to two Currency value fields from another entities ,

thats cause an error ("invalid arguments type (Table) expecting boolean value insted"), and i used a "Value function" too .Capture.PNG

and how can i select a specific record from an entity  , i can only select field !! 

Thank you .

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous,

    I have no idea what the text in your question means but you would select a single record from a datasource using the Lookup() function and it selects the first record in the table that matches the criteria. The syntax is LookUp(Table, Formula )  so in your case it would be something like Lookup(ItemList, columnname=SomeControl.Value).  You would then enclose that with your If() function. 

    If(Lookup(ItemList, Country = Dropdown1.Selected.Country),Label4.Text="true",Label4.Text="false")

      

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you , the characters that you cant understand it its a fields name in arabic , the data type of those are currency , i tried to compare between two fields in Decimal Number Data type but still the same error , i tried your answer but i have an error too 

    2.PNG

    the error : invalid argument type , expected a number value .

    i hope that you can help me to solve this issue.

     

    Thank you again .

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous,

    What are you using for connectors, Sql, CDS, SharePoint, Excel, etc.?

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Could you please share a bit more about the field name you referenced within your formula?

    Could you please share more details about the ItemList that you mentioned?

    Based on the formula that you mentioned, I think there is something wrong with it.

    Firstly, if you want to compare two Decimal Number Values using <= operator in If function, you must make sure the two parts you want to compare both return a Decimal Number value.

    The result the Filter formula returned is a Table value rather than a Number value. In addition, you could not assign a value to a Label control directly (as mentioned within your formula).

    On your side, please modify your formula as below:

    If(
    Value(LookUp('Market-Customers', cr4d3_primaryname=Dropdown1.Selected.Value).CurrencyColumn) <= Value("A specific value"),
    Set(LabelValue, "true"),
    Set(LabelValue, "false")
    )

    Set the Text proeprty of the Label control to following:

    LabelValue

     

    More details about LookUp function and If function in PowerAps, please check the following article:

    LookUp function

    If function

     

    Best regards,

    Kris

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    hai Dude , CDS connection 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    thank you man for this solution , it works now ,

    i need to explain that "ItemList" is a collection , my task now i need to sum all prices from a specific record in this Collection and compare between the CDS field of "Market-Customers" Entity can you help me in this issue . Capture.PNG

    the image above from the "ItemList" collection Price field i need to sum those prices to use the result in Comparing between another CDS entity.

    Thank you agian , i appriciate your support .

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Have you solved your problem?

    If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved already.

     

    Best regards,

    Kris

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard