I am trying to run a flow from a button in power apps. Everytime I do it I get the same error and I have tried changing multiple things in the formula and also in the flow. I dont know what I need to do have it so it works. It wont run the flow when I push the button.
* I have also tried so I only had 1 "send email in body/ Ask power apps" in Microsoft Flow
I have attached some screenshots for reference.
Solved! Go to Solution.
I'm pretty sure the value you need is DataCardValue4.Selected.Value based on what I see in the screenshot.
Replace the '&' ampersands in your run statements with ',' commas. The Ampersands concatentate all the values into one long string while the Flow is expecting to receive 4 string parameters. Your run statement should taek this form.
TestPowerAppButton.run(String1, string2, string3, string4)
yours looks like this
TestPowerAppButton.run(String1 & string2 & string3 & string4)
hello @Pstork1 ,
Thank you for your fast reply.
I have tried the following options and it gave me 2 errors:
Option 1- testPowerAppButton.Run(Name_DataCard1, Email_DataCard1, DES_DataCard1, Supplier_DataCard1)
Option 2- testPowerAppButton.Run(BrowseGallery1.Selected.Name, BrowseGallery1.Selected.Email, BrowseGallery1.Selected.DES, BrowseGallery1.Selected.Supplier)
Option 1- Gave me tons of errors!
Option 2- Errors: Invalid Argument Type (record), expecting text value instead.
*All of these options are text options
Error 2-The function 'run' has some invalid arguments
Option #1 is close, but you can't pass the entire card as a parameter. You ahve to pass the text value contained in the card. So its something like this:
testPowerAppButton.Run(DataCardValue4, DataCardValue8, DataCardValue12, DataCardValue16)
You'll need to expand each datacard to find out what the name of the Value inside the datacard is.
Option#2 would probably work also, but one of the values you are referencing is a collection of records and not a Text value. Its probable either DES or Supplier if either of these is implemented as a Dropdown. Putting a First() around a set of records will return the first record and that will often help.
Hello @Pstork1 ,
Thank you so much that worked by doing it this way. I have been trying to figure out how I was going to do this via Microsoft for weeks and this solved helped solve it!!! So excited!
This is what i used:
and then I did ,so I could test a value that was a number and that worked.
For example (supplier = airline= data card 4)
When I tried doing it for a value that is a drop-down menu it didnt work...
I want to keep those options as a drop-down menu since it helps better if I keep it hooked up to Power Bi.
Thank you so much for your help so far-- once this last piece is solved then I will close this form and I will have everything perfect!
For the dropdowns make sure you add .value to the selected property. You need that to get just the text rather than the text and the index.
Sorry I tried the following:
Sorry this is my first time using power apps so I don't have the formulas down yet! Are you able to give me an example of it?
Which of the datacards contain Dropdowns and what is the name of the dropdown control?
DataCard 4 contains a drop down menu-- i have attached some pictures that may help figure that out.
Sorry I dont know what you mean the name of the dropdown control...
Also if you are wondering where I get this information from it from Microsoft forms to a SharePoint then to power app...