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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

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.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,577)