Hi,
Can you please help me with the below scenario. Lists built on SharePoint.
List 1: Employee Information, Location field is Managed Metadata.
List 2: Company Store Order, Location field is Single line of Text.
On Form 1 Submit ( Employee Information), I want to write to Company Store Order using On Success.. Location does not work with the error, "The type of this argument does not match the expected type. The type text was found."
ForAll(
ExpenseCollection,
Patch(
'Company Store Order Form',
Defaults('Company Store Order Form'),
{
Title: LineItem,
Quantity: LineQuantity,
Price:LineCost,
Size:LineSize,
MasterID:Form1.LastSubmit.ID,
EName:Form1.LastSubmit.Title,
PhoneNumber:Form1.LastSubmit.PhoneNumber,
Location:Form1.LastSubmit.Location.Selected
}
)
)
Any help is appreciated.
Thanks
Solved! Go to Solution.
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-json
Don't forget to hit the thumbs up if this helped!
Remove the SELECTED on the location:
ForAll(
ExpenseCollection,
Patch(
'Company Store Order Form',
Defaults('Company Store Order Form'),
{
Title: LineItem,
Quantity: LineQuantity,
Price:LineCost,
Size:LineSize,
MasterID:Form1.LastSubmit.ID,
EName:Form1.LastSubmit.Title,
PhoneNumber:Form1.LastSubmit.PhoneNumber,
Location:Form1.LastSubmit.Location
}
)
)
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Thanks, I tried that first. I get the same error. " The type of this argument "Location" does not match the expected type "Text". Found type "Record';
I'm not proficient on what "managed metadata" is in the world of SharePoint but this sounds like it could be similar to a JSON object. If it is, then the error message you are receiving is accurate. You cannot set a text field to be equal to a value of type object. I would think there's a few solutions to your problem:
Hope this helps!
Thank you very much. Can you please provide me some resources to achieve option 1.
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-json
Don't forget to hit the thumbs up if this helped!
User | Count |
---|---|
256 | |
107 | |
90 | |
51 | |
44 |