cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ddas
Level: Powered On

Re: 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 

formFormula.PNG

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.

TimRohr
Level 10

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

 

 

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."

 

ALTERNATE OPTION:

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).

 

ddas
Level: Powered On

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

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. 

DataCard.PNG

TimRohr
Level 10

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

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.

 

 

Highlighted
ddas
Level: Powered On

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

Hey @TimRohr

 

Thanks for all your help and patience!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 62 members 4,525 guests
Please welcome our newest community members: