cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JP86
Helper II
Helper II

Help with Invalid argument type (Control). Expecting a Text value instead.

Hello,

 

I am new to power apps and power automate and can't find an answer to my issue that I am currently running into.

 

I have a sharepoint list setup for the database values. The customer data is being retrieved from another sharepoint list that has all the customer data.

 

My current power apps application retrieves its data from the database sharepoint list but since the customer data is coming from a second sharepoint list the datacardvalue's in the form show as Choices([@'Project Database'].Customer_x003a_Address). This all works well in the form display.

 

My issue starts when trying to tie in power automate from power apps. Power automate will fill a word template with the data from the form but I get the error "Invalid argument type (Control). Expecting a Text value instead". 

 

When i add a datacardvalue into the working function below it shows the expecting a text value instead. I assume this is because the datacardvalue is being retrieved from a choices function. I don't know how to use that retrieved text in the flow function to get it over to power automate.


This works because all the datacardvalues are text values

GenerateSheet.Run(DataCardValue2, DataCardValue1, 8, 4,5, Label2, 7, 8, 9, 10,11,12,13,14,15,16,17,18,19,20,21,Label2,23)

3 REPLIES 3
timl
Super User
Super User

Hi @JP86 

Typically, we would call the Text property of a text input control to return to text value.

I see that you're passing control objects such as datacardvalue and Label to your Flow. This is the reason for the error that you see - "Invalid argument type (Control). Expecting a Text value instead".

This syntax should work better for you.

GenerateSheet.Run(DataCardValue2.Text, DataCardValue1.Text, 8, 4,5, Label2.Text, 7, 8, 9, 10,11,12,13,14,15,16,17,18,19,20,21,Label2.Text,23)

 

 

Hi timl, thanks for the response. I have tried the suggestion with adding the .Text at the end of the datacardvalue but it then gave me a different error "The funtion 'Run' has s ome invalid arguments.

 

The datacard text that I am trying to include in the syntax has this function Choices([@'KD Project Database'].Customer_x003a_Address). The text displays correctly in the form data but I can't get this text to send over to power automate in the Run

Charles0252
Frequent Visitor

Hi did you ever solve this issue?

I have the same problem 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,654)