web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Button that will conca...
Power Apps
Answered

Button that will concatenate User email and Time and enter into a field - Date Stamp

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I need a button that on select, date stamps along with the users email to a field/column when in New Mode.

I have tried the following to no avail and the update context function (via googling) has me lost to try and get i.e  fred.jones@constco.com - 2018-05-09T17:59:27

 

I tried the following:

"If(IsBlank(Signedby),ThisItem.SignedBy=Concatenate(User().Email,"-",Now()),ThisItem.SignedBy)"

I did try originally "ThisItem.SignedBy=Concatenate(User().Email,"-",Now())"  but did not work did not pass go.

 

So we have a blank column/field that is "SignedBy" which is blank (because form is new), so that when the button is clicked it stamps the User email and the date + time in the field.

Concat and Concatenate seem to be the wrong function for what I am doing - eror messages point this out but no guidance to how to fix.

 

Also when the form is in the edit mode - and the button clicked (will hide it eventally if in edit mode) - I figured that the field would not change because of the else part of the if.

 

Thank you.

 

Categories:
I have the same question (0)
  • xyzzyx666 Profile Picture
    170 on at

    you can try as this:

    Concatenate(Text(User().Email),"-",Text(Now()))

  • Verified answer
    v-sheyu-msft Profile Picture
    Microsoft Employee on at

    hi @Anonymous,

    Can you share a bit more about your issue?

    Can you show me the error info of your issue?

    Is ‘signedby column text type?

     

    Based on the formula you provided, I think there is something wrong with it.

    Currently,Assigning a value to control within another control directly is not supported in PowerApps.

     

    I made a test.

    8.PNG

    Set the default property of datacardvalue4 (Text Input box) to:

    If(EditForm1.Mode=FormMode.New, Var1, ThisItem.SignedBy) 

    Set the onselect property of the button to:

    If(IsBlank(SignedBy),Set(var1, User().Email&"-"&Now()),Set(var1,Parent.Default))

     

    on your side, you should type:

    If(IsBlank(ThisItem.SignedBy),Set(var1, User().Email&"-"&Now()),Set(var1,ThisItem.SignedBy))

    Set the OnVisible property of the Edit screen to following:

    Set(var1, Blank())

    regards,

    Eason

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Eason,

     

    Following your example I get error messages as per attchemnt.   2018-12-19 09_26_44-SafetyConversation - Saved (Unpublished) - PowerApps.png

    And closer image of  error messages per second attachment. 2018-12-19 09_29_35-.png

     

    ThisItem.Signedby is a text column.

     

    Original eror messaging as per attchement - 2018-12-19 09_33_25-Original-.png with onselect as

    If(IsBlank(Signedby),ThisItem.SignedBy=Concatenate(User().Email,"-",Now()),ThisItem.SignedBy) 

     

    Kind Regards.

     

     

    2018-12-19 09_29_35-.png
    2018-12-19 09_33_25-Original-.png
    2018-12-19 09_26_44-SafetyConversation - Saved (Unpublished) - PowerApps.png
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Yup - took a while - had the button in the wrong part of the form - it was outside the editform1.

    When I moved the button to inside the card "SignedBy" - yeah - success.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 316 Most Valuable Professional

#2
11manish Profile Picture

11manish 242

#3
Valantis Profile Picture

Valantis 198

Last 30 days Overall leaderboard