I have a FORM, with contains a "DATE" field that records the date in which this form is submitted the first time.
Than i have a separate Text label.
Now, I want to change the color of text label just in case one of the Form'card has been changed and submitted today.
So, what I would like to get is:
1. When i open the app, text is RED
2. If Form has not been edited and submitted today --> text becomes GREEN
If tomorrow I open again the APP, I need the label Text is again RED, and waits to become GREEN just in case someone update and submit FORM today.
I cannot figured out what I can use in the IF formula, to be inserted in the text label color field.
can you help me?
hope to clearly state the problem
thanks in advance
Follow these steps:
1. Set a Variable OnStart of the App: Set(OldColor,true)
2. On the color property of the label in which you want the color changed, put this formula:
3. Finally, on your submit button, add this to the OnSelect:
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
thank you very much for your solution.
Unfortunatly the variable you are proposing is linked to the app start.
It means that it works correctly when I open app and then update a form with Submit.
But now, if I close and open the app, the color returns to OldColor, even if the previous Form has been submitted today.
Else-way, I need the textlabel to keep new color even if the app is closed.
Textlabel colour will keep the information on which a specific Task has been updated or created in the Form, via Submit form.
So I think I need to link the variable to today() function, in some way!
Sorry for do not clearly explain the topic, my fault.
Hi @Amar ,
Using previous logic (you will need to replace YourListName with the actual name). The first Variable is to avoid delegation issues on User().FullName.
Set( vUserName, User().FullName ); Set( OldColor, IsBlank( LookUp( YourListName, 'Created By'.DisplayName = vUserName && Created = Today() ) ) )
This would look for anything in the list created by the present user today and if present, set OldColor to false.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Check out the News & Announcements to learn more.
Did you know that you can visit the Power Query Forum in Power BI and now Power Apps
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
Check out our new Discover Your Career Path blog post series and get all the details.