I have a NewForm submitting to a Dataverse table. How can I customize submit to save the attribute Office365Users.MyProfile().Mail to an email field in the table ? I do not want a DataCard in the form, I just want to save the authenticated user's Mail attribute when the submit button is pressed, together with the cards that are mapped to other fields in the Dataverse table
Thanks
Solved! Go to Solution.
Hi @emmebi,
Do you want to patch the Mail to email filed in your Dataverse table but not with the submit action?
Could you please tell me that if the email field is a Text column in your Dataverse table?
Actually, if you want to patch the mail to the last submitted record, you could not put it with the SubmitForm() together.
As an alternative solution, please set the OnSuccess property of the Edit Form as below:
Patch(YourDataverseTable,EditForm1.LastSubmit,{EmailField:Office365Users.MyProfile().Mail})
Hey!
Have you tried
Collect(
YourListName,
{
emailField: Office365Users.MyProfile().Mail});
also you can try it like this:
Collect(
YourListName,
{
emailField: User().Email});
Hi @emmebi,
Do you want to patch the Mail to email filed in your Dataverse table but not with the submit action?
Could you please tell me that if the email field is a Text column in your Dataverse table?
Actually, if you want to patch the mail to the last submitted record, you could not put it with the SubmitForm() together.
As an alternative solution, please set the OnSuccess property of the Edit Form as below:
Patch(YourDataverseTable,EditForm1.LastSubmit,{EmailField:Office365Users.MyProfile().Mail})
I have tried to use:
SubmitForm(RequestAddNewForm);Collect('Requests',{Submitter:Office365Users.MyProfile().Mail})
in the OnSelect action of my submit button, but the Submitter field is not updated. I don't know if I can use SubmitForm and Collect together...
Hi @emmebi,
Collect() function is to create a collection rather than update the Dataverse table. The formula you tried makes no sense.
The collection is a temporary table you saved on the device, but what you want is to update the data source.
Hi Qi,
many thanks for your answer. The 'Submitter' field data type in my Dataverse for Teams table is Email (Text in email format).
Best,
emmebi
Dear Qi (@v-qiaqi-msft),
it works ! I had to delete the Submitter field and recreate it as a Text field: it seems that Email field type is read-only.
By the way, I am saving the user's email in my Dataverse table because I'm not able to retrieve it in a Power Automate flow, but that is another question...
Many thanks for your most precious support !
Best,
emmebi
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
13 | |
10 | |
6 | |
4 | |
3 |
User | Count |
---|---|
28 | |
17 | |
13 | |
9 | |
8 |