web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Difficulties passing t...
Power Automate
Unanswered

Difficulties passing text to a flow.

(0) ShareShare
ReportReport
Posted on by 457
I've built an app for our staff to create new projects. The form asks questions like the client name, region, address, project manager, etc. It uses this data, in part, to create a new item in a SPO List. So, I'm just trying to get data from this App form and send it to PowerAutomate.  
 
From the guides I've found online, the OnSelect for the button should be something like:  
NewProjectFLOW.Run(ClientName.Text, Region.Selected.Value)  
 
Doing so results in the error: 
Error: Invalid number of arguments: received 2, expected 0-1. 
 
I get the same error when I write this: 
NewProjectFLOW.Run("Test Name", "Test Region")  
 
When I'm typing out that formula, it's suggesting the formula be: 
NewProjectFLOW.Run({text:" ", text_1:" "}  
 
When I use this formula, it works: 
NewProjectFLOW.Run({text:ClientName.Text,text_1:Region.Selected.Value})  
 
I'd really prefer to use the names of my inputs as I have a couple dozen of them. However, when I run this formula, it fails to send any data through. 
NewProjectFLOW.Run({clientname:ClientName.Text,region:Region.Selected.Value})  
Where 'clientname' and 'region' are the text input fields in the flow using PowerApps (V2) trigger.  

Is it not possible to utilize the input names as I've entered them? 
 
Also, I'm looking into a guide I found that suggests using collections and parsing JSON. I may give that a shot but I'm hesitant given the issues I'm having. 
Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,707 Most Valuable Professional on at
    Can you show how the Trigger in the flow is configured?  You need to feed the flow the parameters in the order in which they are entered and they have to be the right data type.  Based on the IntelliSense it looks like you defined one input parameter of type string and are passing it as a JSON object.  If so you need to pass the values inside a record delimiter with appropriate names.  That is what you are seeing in the formula. After you get the string in the flow you would need to do a parse JSON on it to access the two individual values.
     
    Also what kind of control or variable is ClientName and Region?
  • anthonys123 Profile Picture
    457 on at
    I really wish we were able to reply to people in this forum.  
     
    The trigger is Power Apps (V2) with two Text Input values named clientname and region.  
    I have two Compose actions to acquire that data.  
     
    ClientName is a Text Input. 
    Region is a Dropdown. 
     
  • Suggested answer
    Pstork1 Profile Picture
    68,707 Most Valuable Professional on at
    If ClientName is a Text input control and Region is a dropdown then the correct syntax should be what you first tried.  But you can't use the names of the inputs in Power Apps since it doesn't know anything except the data type and the order of the inputs.
     
    NewProjectFLOW.Run(ClientName.Text, Region.Selected.Value)  
     
    If that doesn't work then makes sure to refresh the flow in the Power App after making any edits. (it may not have picked up the parameters if you added them later.)  You may also need to cast the Selected.Value to Text to make sure its recognized as that rather than a number or untyped.
     
    NewProjectFLOW.Run(ClientName.Text, Text(Region.Selected.Value))
     
  • anthonys123 Profile Picture
    457 on at
    I created a new flow called NewProjectDataFLOW. Same issues. 
     
     
    So to be clear, NewProjectFLOW.Run({clientname:ClientName.Text,region:Region.Selected.Value})  isn't going to work and I'll need to use text, text_1 through text_45, etc?  I did find someone who was changing the input name (which I now can't find) so this is frustrating. 
  • Pstork1 Profile Picture
    68,707 Most Valuable Professional on at
    I created a simple Power App with an Input Text, Dropdown, and Button.  It looks like this
     
     
    Then created a simple Power Automate flow
     
    The OnSelect for the button looks like this
     
    Everything works as expected.  The one thing I noticed is that my Intellisense when adding the flow looks like this.
     
    I'm not sure why yours is asking for a record format. You can't used named parameters unless you change the trigger and pass it a single JSON text string.  The Intellisense shown in your command line suggests that NO parameters have been created in the flow trigger. Are you sure you refreshed the flow in Power Apps after adding it, that its in the same environment and solution, and that you have the name correct? It should show the parameters in the trigger the way mine does when you add the Run line. Yours is showing no parameters.
  • Meekou Profile Picture
    200 Moderator on at
    @ based on your screen shot and description, I assume you are using the wrong flow or not updated flow in powerapps.
     
    Try to follow steps below:
     
    1. Open PowerApps App
    2. Click App flow -> Create new flow directly from PowerApps
    3. Name the flow without total different from previous flows
    4. Check the flow parameters in PowerApps
     
    If the issue still exist, I would suggest you export the solution with PowerApps & Flow, and share us with the exported solution file.
     
    Regards,
    Meekou
  • anthonys123 Profile Picture
    457 on at
    I don't know what's going on and it's getting beyond frustrating.  
     
    I started from scratch with an entirely new solution (001Test), a new flow (001Flow), a new app (001App). This was perfect.  
    '001Flow'.Run(input_clientname.Text,input_region.Selected.Value) 
     
    I then went back to my original app and connected to 001Flow. This was also perfect.  
     
    I then created another new flow (002-NewProjectFLOW). Confident the issue was resolved by simply making a new flow, I went ahead and entered 10 inputs. 
     
    AGAIN - intellisense is insisting on a record rather than a text input. 
     
    I've tried multiple combinations but it just seems like when I create a flow in this solution, - including from inside the App @Meekou - it's calling for a record. If I create the exact same flow outside the solution, it's calling for text. 
  • Pstork1 Profile Picture
    68,707 Most Valuable Professional on at
    If you create the flow outside the app and use Add Existing to add it into the solution does it still do the same thing?
  • anthonys123 Profile Picture
    457 on at
    That's exactly what I was just doing, @Pstork1. It appears to have worked. Going to see if I can save it as a backup, create a copy, and build upon that to make use of it. 
  • anthonys123 Profile Picture
    457 on at
    I've figure it out!   
     
    Changing the field input in the flow to OPTIONAL makes the App think it's a record.  
     
    So, if I have the first input as required and the second as optional, the intellisense looks like 
    'flowname'.RUN(text,{text_1:Text})
     
    Does this make any logical sense? 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard