cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Skitzer1985
Frequent Visitor

Comparing Record Value against Timer

Hi,

 

Looking for some guidance, I'm looking to do some form of conditional formatting on a Label based on a IF statement between a Text Record in a variable and a Timer Output. Visually, it looks like this (image has been sanitized)

 

Skitzer1985_1-1650509313722.png

 

Process wise, when a user scans an item using the barcode scanner feature, it records the boxed value (AssemblyPoints) (in image) as a text field in a variable (varRecord). My thought process was that I could get it to compare that value against the timer and if it was greater than, change label colour to Red (the timer is usually a hidden item). I understand (maybe) that I can't compare Text to Number, so I have attempted to convert that Text field to a number. I can't change the sharepoint list it writes to or the barcode.

My thought was that

 

If(Value(varRecord.AssemblyPoints,"##")<Timer1.Value,RGBA(255,0,0,1),RGBA(0,255,0,1)) (this line lives in the label/Fill area.

 

Should have done this. But alas, my thought was wrong. I was hoping someone could point me in the right direction

 

Thank you in advance.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Skitzer1985
Frequent Visitor

I was looking at it wrong, sort of, got it to work with the following line:

 

If(Value(Mid(Timer1.Text,4,2)) < Value(varRecord.AssemblyPoints),RGBA(0,255,0,1),RGBA(255,0,0,1))

View solution in original post

1 REPLY 1
Skitzer1985
Frequent Visitor

I was looking at it wrong, sort of, got it to work with the following line:

 

If(Value(Mid(Timer1.Text,4,2)) < Value(varRecord.AssemblyPoints),RGBA(0,255,0,1),RGBA(255,0,0,1))

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,154)