Hi All
I am trying to make a simple app with some inputs that are connected to a flow. I've not used any forms, and the only data source it is connected to is the Accounts in Dataverse, and the flow itself. I made the flow in Power Automate first, using the trigger "Power Apps V2", asking for some text inputs, an email, a yes/or question and a text input with choices. Then I made the Power App, which is just some text input fields, a combo box connected to the Accounts data for the email, a toggle for the yes/or and a dropdown.
So, I put a little Submit button there, and in the button in OnSelect I put:
FlowName.Run(Title.text,Description.text,Email.email,Nextone.boolean,Choice.text);
And that comes up with an error.
I think the problem is the ".email" and ".boolean" commands, but I am not sure what they should be. The suggestion, when I am typing in OnSelect, is to put email and boolean there.
That last one, listed as text_4 in the picture, is marked as optional in the flow, and I'm honestly not sure how to write that in the app. It certainly doesn't seem to want Name.text in curly brackets. Well, if it's a problem it being blank I could add a default value of "N/A" or something, that's not a problem.
Can anyone help me with this run command? How should I be writing this?
Thank you very much for your help.
Oh, somehow I have fixed it!
The combo box, I changed SelectMultiple to false (it's true by default, I guess), and then changed the field that it searches the data set from Account Name to Email. Here's me just trying everything at this stage, ha. And then changed the formula in the Submit button's OnSelect to Approver.SelectedItems.Email. I guess I needed to be more specific?
That left the one which was showing up as a record, which turned out to be the dropdown choice. I just changed it to Choice.SelectedText.Value. I don't think I changed anything else. And it seems all the errors just cleared up!
Well, I don't know, I guess sometimes you just have to work at it until you get it, right?
Well, "Email" isn't what it is called, I'm trying to keep it simple. I think I put "Approver" as the name of the combo box (so, Approver.SelectedItems), and the same for the input in the Power Apps V2 trigger, which is an email format. It's supposed to be the manager's email address.
So, in Power Automate, it asks for an email address input from Power Apps, and the response should come from this combo box. If that's a problem, I can change it from a combo box to a text input, I just thought they would prefer to just choose a name from the data set, rather than just type it and risk mistakes.
Lets see what is this: Email.SelectedItems
Hi VasileR, thank you for replying.
I think I have sorted out some of the problems. Please note, some of the information is just an example, as there may be information I shouldn't be sharing.
I have put the following in OnSelect:
FlowName.Run(Title.text,Description.text,Email.SelectedItems,Toggle.value,Choice.SelectedText,FileNo.text,{text_4:RefNo.text})
This is returning the errors:
I'm not sure which ones are causing the errors, but it's probably either the combo box, toggle or the dropdown. What arguments should I put for them?
Thank you for your help.
Hi @MelBo ,
It seems your flow expects 7 parameters, so you need provide values for all of them, or remove from the flow the ones that are not needed.
FlowName.Run(Title.text,Description.text,Email.email,Nextone.boolean,Choice.text); <- 5 parameters only here
Also, the last parameter need to be entered in the form:
FlowName.Run(Title.text,Description.text, ......(rest of params here)...., {text_4: Choice.text} );
Hope this helps