cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
doanhthu
Regular Visitor

Invalid argument type (record). Expecting a text value instead.

I have built an approval flow embedded on my canvas app. OnSelect of Submit button, data from LastSubmit will be fed to email generated in Flow via Ask PowerApps function. However, it keeps telling me that "Invalid argument type (record). Expecting a text value instead" And I stuck at this error, cannot find any other topic discussed about this. I have tried either "form.lastsubmit.remarks.value" or "form.lastsubmit.remarks.text" but didn't work out..

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

Hi @doanhthu 

Welcome to the forums!

I'm not convinced that it's the remarks field that is causing your problem.

More likely, I think it might be the receiver field that is causing the problem, particularly if it's a SharePoint choice column. This would explain why the error reports an invalid argument type of 'record'.

The diagnose this, I would replace formIDMSubmission.LastSumbit.Receiver with an empty string (eg, ""). Does the error go away? If not, I would repeat this process with the other argument values until the error disappears. This will help you identify for sure, the argument that is causing this error.

View solution in original post

2 REPLIES 2
timl
Super User
Super User

Hi @doanhthu 

Welcome to the forums!

I'm not convinced that it's the remarks field that is causing your problem.

More likely, I think it might be the receiver field that is causing the problem, particularly if it's a SharePoint choice column. This would explain why the error reports an invalid argument type of 'record'.

The diagnose this, I would replace formIDMSubmission.LastSumbit.Receiver with an empty string (eg, ""). Does the error go away? If not, I would repeat this process with the other argument values until the error disappears. This will help you identify for sure, the argument that is causing this error.

doanhthu
Regular Visitor

I'm using remarks field as an example. However the method you recommended works really well. I'm able to troubleshoot the error part. 

In the choices field context as you mentioned, I would like to know how we could express correctly on the formula? Thank you so much.

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 (3,382)