Re: making an icon appear after a form is submitted
I have a holiday calendar app where I am color coding a date based on the same sort of functions you are talking about.
Since Power apps doesn't have cookies or anything like that what you would need to to is have a separate list and in that list you would patch the users name using User().fullname or Office365Users.MyProfileV2().DisplayName or whatever matches their name in AD or you can use their email. Patch the date in a separate date column. It's a pain to try to use the default Created or Modified. You only need a single entry for each user as you will modify the date column as needed.
In your App OnStart query that list for the matching user and set a variable to true or false using the formula below. The formula will return either true or false and the variable will be set to the response. Use the variable in the onVisible property of your icon.
Here is the formula you need to verify if the date is within the current month.
In the app OnStart, don't use the OnVisible of the first screen if you have multiple screens or this will re-evaluate every time you go back, adding unnecessary overhead. Replace the LookUp filter with your own, although if you patch the user the first time using their email in a column named email, this will work exactly as it is.
Set(varIconVisible, LookUp(PowerAppsData, User().Email = Email).DateTest >= Date(Year(Now()), Month(Now()), 1) && LookUp(PowerAppsData, User().Email = Email).DateTest <= DateAdd(
DateAdd(
Date(Year(Now()),Month(Now()),1),
1,
TimeUnit.Months
),
-1,
TimeUnit.Days
))
This image shows you both date parts of the formula above, the formula in use and the date it's checking against.
