Skip to main content

Notifications

Power Apps - Power Apps Pro Dev & ISV
Answered

Syntax needed - I am Lost!!!!

Posted on by 6
Hello
 
I am new to power apps and the power fx language and I am in need of a formula. I hope someone can help. I want to fill this circle with a colour based on conditions. In this case If the value number of welds actually inspected (6) in this case) is greater than or equal to number of items for inspection (2 in this case), I want to turn green if its true and red if it is false. But I keep getting errors. I am pulling my hair out. 
 
 
  • mmbr1606 Profile Picture
    mmbr1606 9,952 on at
    Syntax needed - I am Lost!!!!
    What do you want to sum Here?
     
    I only see one contract Number
  • KM-25111106-0 Profile Picture
    KM-25111106-0 6 on at
    Syntax needed - I am Lost!!!!
    Hello again
     
    Hope I marked this solution correctly for you.
     
    Can I ask another thing?
     
    I wanted to be able to calculate some Sums based on a selection value. In this instance, I want to select the different contract no, the two boxes below populate with adding up the respective values from the galleries for that contract number. I am so new to this. Any help is greatly appreciated. 
     
  • Verified answer
    mmbr1606 Profile Picture
    mmbr1606 9,952 on at
    Syntax needed - I am Lost!!!!
    hey
     
     
    in a gallery u need the ThisItem reference
     
    so you can try this:
    If(
        Value(ThisItem.NumberOfWeldsActuallyInspected) >= Value(ThisItem.NumberOfItemsForInspection),
        Color.Green,
        Color.Red
    )
    you might need to rename the column name.
     
     
    please also make sure, to mark the answer as verified,
     
     
     
    cheers
  • KM-25111106-0 Profile Picture
    KM-25111106-0 6 on at
    Syntax needed - I am Lost!!!!
    That works an absolute treat. Thank you so much. One last query. In gallery, I want to add the outcome of that so you can see it at a glance. I try the same formula but it either colours them all red or green and not specific to the record. Any help?
     
  • Suggested answer
    mmbr1606 Profile Picture
    mmbr1606 9,952 on at
    Syntax needed - I am Lost!!!!
    hey
     
     
    can u try this:
    If(
        Value(DataCardValue12.Text) >= Value(DataCardValue11.Text),
        Color.Green,
        Color.Red
    )
    
    if it was helpful please mark as verified answer
     
     
    cheers

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,297

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,890

Leaderboard