So i have a QR code that puts out a email and then a date, then the email is used to find more data on the user. this all works.
But the date is also given as more of a security reason, when it doesn't match the current date the user shouldn't be able to press the next button to continue the process.
the data this variable puts out is 24-07-2020, i checked this by putting it in a text field and looking at the output.
"Datum: " & _gastdatum
i tried adding the code below to the displaymode tag of the button itself,
If(IsToday(DateTimeValue(_gastdatum, "DD-MM-YYYY")),
DisplayMode.Edit,
Disabled
)
But unfortunately, the button stays the same even thought he dates are matching.
If u need any more info please let me know.
Any insight or help would be appreciated, thank you so much.
Solved! Go to Solution.
Hi @WesselO ,
Try this for the final time on DisplayMode property:
If(Text(Today(),"dd-mm-yyyy") = Text(_gastdatum, "dd-mm-yyyy"),DisplayMode.Edit,DisplayMode.Disabled)
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.
Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Hi @WesselO ,
try this:
If(Text(Today(),DateTimeFormat.ShortDate) = Text(gastdatum,DateTimeFormat.ShortDate),
DisplayMode.Edit,
Disabled
)
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.
Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Try
If(IsToday(DateValue(_gastdatum, "DD-MM-YYYY")), DisplayMode.Edit, Disabled )
If(Text(Today'"DD-MM-YYYY")=Text(_gastdatum, "DD-MM-YYYY"), DisplayMode.Edit, Disabled )
If you have issues, explain how you got the variable _gastdatum further
------------
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.
Hey Krishna,
i tried this and unfortunately it doesn't work for me.
after scanning the qr code with a correct date the button is still greyed out for me,
a screenshot below.
Hi @WesselO ,
try this:
if(Text(Today(),"dd-mm-yyyy") = Text(columnName,"dd-mm-yyyy"),Edit,Disabled)
Note: "dd-mm-yyyy" is case sensitive
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.
Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Hey eka24,
i tried both your solutions and unfortunately it didnt work for me.
the way i get this variable is through scanning a qr code, which is this link
https://chart.googleapis.com/chart?cht=qr&chl=example@email.nl,24-07-2020&choe=UTF-8&chs=400x400
i then proceed to split the email and the date from eachother like so,
Set(_gastemail, First(Split(btn_scanner_qr.Value, ",")).Result),
Set(_gastdatum, Last(Split(btn_scanner_qr.Value, ",")).Result)
this gets done on qr scan, after which the data gets shown on screen and u get the option to continue, this is where the button part comes in and the button should be disabled when the date isn't correct.
hey KrishnaV, thank you for the continueous help.
i get a error code here, not sure what it is.
Hi @WesselO ,
Try this:
Set this to Display mode property:
if(Text(Today(),"dd-mm-yyyy") = Text(columnName,"dd-mm-yyyy"),DisplayMode.Edit,DisplayMode.Disabled)
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.
Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Hey krishnaV,
unfortunately i get the same error.
Hi @WesselO ,
Try this for the final time on DisplayMode property:
If(Text(Today(),"dd-mm-yyyy") = Text(_gastdatum, "dd-mm-yyyy"),DisplayMode.Edit,DisplayMode.Disabled)
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.
Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
254 | |
251 | |
84 | |
36 | |
32 |
User | Count |
---|---|
338 | |
264 | |
123 | |
72 | |
46 |