cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Robert14356
Resolver I
Resolver I

Power Apps patch and submitform aren't working together

Hello All.

 

Im having an issue with using Submitform and patch in the same button action.

 

I need it to patch the user email of the person who is making the form, but i dont want to have that field in the form as it will be uselss and take up space.

 

I have tried doing the following below, but it will only do the form submit.

 

Should i just do a patch only? i like the form because it makes everything so much easier.

 

Concurrent(

Patch(
'PMBCR Data List',
Defaults('PMBCR Data List'),
{
Title: 'Title New Value Prop'.Text,
Requestor:
If(
IsEmpty('Requestor New Value Prop'.Selected) ||
IsBlank('Requestor New Value Prop'.Selected),
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Claims: "i:0#.f[membership|" & Lower(User().Email),
Department: "",
DisplayName: "",
Email: User().Email,
JobTitle: ".",
Picture: "."
},
'Requestor New Value Prop'.Selected
),
'Requestor Email':
If(
IsEmpty('Requestor New Value Prop'.Selected) ||
IsBlank('Requestor New Value Prop'.Selected),
User().Email,
Concat('Requestor New Value Prop'.SelectedItems.Email,Email)
)
}
),

SubmitForm('Form New Prop')
)

1 ACCEPTED SOLUTION

Accepted Solutions
gabibalaban
Dual Super User
Dual Super User

@Robert14356 ,

The form also create an item in 'PMBCR Data List' ? If so, in this case it should appear 2 rows one created by Patch and one created by the form. 

I like the form because it makes everything so much easier.

Yes. You are so right !

I dont want to have that field in the form as it will be uselss and take up space.

You can hide the datacard (that's the right approach) and set the update property of the datacard(even if it is hidden it will work) to:

If(
IsBlank('Requestor New Value Prop'.Selected),
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Claims: "i:0#.f[membership|" & Lower(User().Email),
Department: "",
DisplayName: "",
Email: User().Email,
JobTitle: ".",
Picture: "."
},
'Requestor New Value Prop'.Selected
),

Hope it helps !

View solution in original post

2 REPLIES 2
gabibalaban
Dual Super User
Dual Super User

@Robert14356 ,

The form also create an item in 'PMBCR Data List' ? If so, in this case it should appear 2 rows one created by Patch and one created by the form. 

I like the form because it makes everything so much easier.

Yes. You are so right !

I dont want to have that field in the form as it will be uselss and take up space.

You can hide the datacard (that's the right approach) and set the update property of the datacard(even if it is hidden it will work) to:

If(
IsBlank('Requestor New Value Prop'.Selected),
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Claims: "i:0#.f[membership|" & Lower(User().Email),
Department: "",
DisplayName: "",
Email: User().Email,
JobTitle: ".",
Picture: "."
},
'Requestor New Value Prop'.Selected
),

Hope it helps !

Robert14356
Resolver I
Resolver I

making the card invisible works i guess lol

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,429)