cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JR-BejeweledOne
Super User
Super User

Power Apps Patch Statement Error expects text finds record

I am having the strangest patch error.

 

This type of argument 'Approver' doesn't match the expected type 'Text'. Found type 'Table'.

 

I am patching from a collection to a SharePoint list.   The Approver is patched to the collection from a variable.   The variable does not show as a record and neither does the item in the collection.    I am at a loss as to why it's seeing this item as a record in the patch statement.

 

I have refreshed the data source, saved, exited and come back in and it still has an error.

 

You can clearly see that the initial variable that holds the approver data (ManagerDN) is text and not a record.

 

variables.png

 

So the RequestInput Collection would not have a record value for approver since that value comes directly from the ManagerDN variable.

 

Collection.png

 

Error (In this instance, the collection only has one row, once I complete the If statement, the first statement will have the ForAll as the collection will have multiple rows):

 

PatchError.png

 

 

 

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
1 ACCEPTED SOLUTION

Accepted Solutions

I tried everything I could think of and could not get this to work.   I eventually copied a patch statement from another app and modified it and then pasted it into my current app.   For whatever reason this worked when nothing else would.



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

View solution in original post

3 REPLIES 3
gabibalaban
Super User II
Super User II

Hi @JR-BejeweledOne ,

Use the variable ManagerDN instead of RequestInput.Approver. Starting from what you described such an approach should work, right ?

It would work for the single row instance, but not when the collection has more than one row.   There are multiple things going on here, and the collection isn't being patched immediately after being collected except in this one instance.

 

I need to resolve this so I won't have issues when I am patching the collection when it has multiple rows to SharePoint.



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

I tried everything I could think of and could not get this to work.   I eventually copied a patch statement from another app and modified it and then pasted it into my current app.   For whatever reason this worked when nothing else would.



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (68,575)