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

ForAll patch error

 

Hi, trying to submit this code returns an error for line 5 (and line 7). If i change out Title for a string eg Title="1234" it works as expected. I have tried creating a new column so it isnt Title=Title Smiley Wink but same error. Can anyone give me a hint as to what im doing wrong Smiley Tongue

 

The intent is to check if a record exists and either patch or create new, so if theres a better way please let me know Smiley Happyerror.png

 

Full code:

 

ForAll(LocalFormQueue,
	Patch(
		Form,
		If(
			IsBlank(Lookup(Form,Title=Title)),
			Defaults(Form),
			LookUp(Form,Title=Title)		
		),
		{
			Title: Title,
			Shift:{
				'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                IdSmiley Frustratedhift.Id,
                ValueSmiley Frustratedhift.Value
            },
			Department:{
				'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                IdSmiley Very Happyepartment.Id,
                ValueSmiley Very Happyepartment.Value
            },
			Site:{
				'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                IdSmiley Frustratedite.Id,
                ValueSmiley Frustratedite.Value
            },
			CriticalRisk:{
				'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                Id:CriticalRisk.Id,
                Value:CriticalRisk.Value
            },
			InspectedDate:InspectedDate,
			NotesHRTD:NotesHRTD,
			NotesCR:NotesCR,
			NotesTB:NotesTB,
			InspectedBySmiley FrustratedPUser
		}
	)
)

 

1 ACCEPTED SOLUTION

Accepted Solutions
JaredKing
Level: Powered On

Re: ForAll patch error

I solved it, changed the variable name on the RHS and it works. 

View solution in original post

1 REPLY 1
JaredKing
Level: Powered On

Re: ForAll patch error

I solved it, changed the variable name on the RHS and it works. 

View solution in original post

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

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

Top Kudoed Authors
Users Online
Currently online: 96 members 3,794 guests
Please welcome our newest community members: