Showing results for 
Search instead for 
Did you mean: 
Helper II
Helper II

Use button to fill in data card text box with Office365Users.MyProfile().DisplayName info.

Is it possible to do this. Use button to fill in data card text box with Office365Users.MyProfile().DisplayName info?


Thanks for being so detailed and putting so much info for me to follow. I renamed the datacard and Column in the sharepoint list to what you called it to make everything easier to follow. I have followed your directions but my button doesn't seem to do anything when it is clicked. Below is a screen shot of the OnVisible of the EditScreen 


I think it is correct but you can tell me for sure.

For the button I added the formula you suggested. 

UpdateContext({_DigitalSig: Office365USers.MyProfile().DisplayName})

Not sure where I went wrong but your insight would be greatly appreciated. Thanks.



What does your DigitalSig datacard have for the Default property? (If you see "Parent.Default" then you're looking at the textbox input for the datacard. Pull up the Datacard.) It should point to _DigitalSig, instead of "ThisItem.DigitalSig."



All of this said... if we can't get this context variable approach to work AND provided you have the proper field structure for the record (that is, one field for the "owner" of the form, and another for the signature-acknowledgment of that person authorizing the form), you could use a Patch() statement in your button. Leave the Datacard point to the "ThisItem.DigitalSig" field, but use Patch() to update the DigitalSig field in the Sharepoint list, setting it to be the DisplayName. That's another way to get where you want to go. The important thing is that you have the differentiation between the two fields (employee owner and signature).


Below is a screen shot of the _DigitalSig datacard. _DigitalSig has ThisItem.DigitalSig on the Default Property.  DataCardValue51 has Parent.Default in the Default Propery. If I change ThisItem.DigitalSig to ThisItem._DigitalSig I get an error. 


I think something got lost in transmission... if you are going to match my naming suggestions (or even just to make sense of my naming suggestions) this is what you would have to do:


SharePoint list field is named "DigitalSig"

DataCard on form is named "DigitalSig_EditScreen" (or something similar... something NOT "_DigitalSig")

Context variable is named "_DigitalSig"


Then put the code into the various parts of the app as I described (creating the context variable in the OnVisible event of the form, changing it in the button OnClick, etc.).


Finally, make the Default of the DataCardValue51 control to be "_DigitalSig"... if you do NOT have your datacard named this, there should be no confusion, and the app should read the context variable into the textbox.



View solution in original post

Hey @TimRohr


Thanks for all your help and patience!

Helpful resources

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users


We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (34,130)