Hello,
I am trying to incorporate peninput for signatures with my app/sharepoint list. I am following this tutorial:
https://matthewdevaney.com/capture-a-signature-with-power-apps-pen-input-and-save-to-sharepoint/
One of the things not mentioned that I would like to do is updating the "Date/Time" every time a new peninput is accepted.
Currently my "accept" labels have OnSelect = > Set(varShowSignature, false) to get the signature off screen.
Is there anyway to add to this function to also make my "Date" box, "Label13" update with the Text( Now() function?
I tried something like just adding it after the first function with OnSelect = > Set(varShowSignature, false);;Set(Label13,Text( Now()) but no luck.
I am not very good at this. Any tips?
Hi @SamR ,
The property of an object can't be set directly during runtime. Properties can only be defined at 'buildtime' or when you're editing your app. You can however set them indirectly using a variable during runtime.
The idea is to define the property as a variable, and then "set" or update the context of the variable at 'runtime', which is while the app is running.
Variables can be app global, screen local, or expression local. If in doubt as to which scope to use, screen local is usually safest.
To set an app global you use Set().
To set a screen local variable, use UpdateContext().
To stick with your example though, you can define Label13's Text: property as varWhatever.
You can then use;
Set(varShowSignature, false);;Set(varWhatever, Now())
on your "accept" label OnSelect: property.
Hope this helps,
RT
HI @SamR ,
You need to set a Variable to Now() and have the Default of the text box set to this Variable. You then Reset the Text box and it will assume the new value.
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.