Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Help with dual OnSelect functions? Would like to update date/time of data lable when PenInput is accepted

(0) ShareShare
ReportReport
Posted on by 30

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?

 

 

Categories:
  • Verified answer
    RusselThomas Profile Picture
    RusselThomas 4,012 on at
    Re: Help with dual OnSelect functions? Would like to update date/time of data lable when PenInput is accepted

    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

     

  • WarrenBelz Profile Picture
    WarrenBelz 145,495 on at
    Re: Help with dual OnSelect functions? Would like to update date/time of data lable when PenInput is accepted

    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.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,495

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,822

Leaderboard