Hi all,
I have a flow running from Power apps when the user presses a submit button.
There are 5 dropdowns for project choices and then 5 dropdowns for the corresponding percentage (Allocation) to each project. The user must first fill in the drop downs and select a project from each drop down, and then select the Allocation from the drop down next to it. Now it can be the case that not all 5 are selected, therefore I set AllowEmptySelection to true so the user can just fill in selections for 3 projects for example, instead of all 5, therefore 2 dropdown boxes are left blank.
I therefore changed my formula to:
'133-TimeAllocationMasterFlow'.Run(If(IsBlank(paEmployee.Text),"",paEmployee.Text),If(IsBlank(paAllocation1.Selected.Value),"",paAllocation1.Selected.Value),If(IsBlank(paProject1.Selected.Name),"",paProject1.Selected.Name),If(IsBlank(paAllocation2.Selected.Value),"",paAllocation2.Selected.Value),If(IsBlank(paProject2.Selected.Name),"",paProject2.Selected.Name),If(IsBlank(paAllocation3.Selected.Value),"",paAllocation3.Selected.Value),If(IsBlank(paProject3.Selected.Name),"",paProject3.Selected.Name),If(IsBlank(paAllocation4.Selected.Value),"",paAllocation4.Selected.Value),If(IsBlank(paProject4.Selected.Name),"",paProject4.Selected.Name),If(IsBlank(paAllocation5.Selected.Value),"",paAllocation5.Selected.Value),If(IsBlank(paProject5.Selected.Name),"",paProject5.Selected.Name)
However, it does not accept this. The issue is with the project dropdown i.e., paProject1/2/3/4/5, not the allocation as in power automate I have allowed 0% to be accepted for the allocation.
Does anyone know how to run a flow for empty/blank drop downs.
Thanks.
Solved! Go to Solution.
Ok, let's look at the formula again and force text values instead of blanks where the input is a text type and a zero where its a number type:
'133-TimeAllocationMasterFlow'.Run(
If(IsBlank(paEmployee.Text), "", paEmployee.Text),
If(IsBlank(paAllocation1.Selected.Value), 0, paAllocation1.Selected.Value),
If(IsBlank(paProject1.Selected.Name), "", paProject1.Selected.Name),
If(IsBlank(paAllocation2.Selected.Value), 0, paAllocation2.Selected.Value),
If(IsBlank(paProject2.Selected.Name), "", paProject2.Selected.Name),
If(IsBlank(paAllocation3.Selected.Value), 0, paAllocation3.Selected.Value),
If(IsBlank(paProject3.Selected.Name), "", paProject3.Selected.Name),
If(IsBlank(paAllocation4.Selected.Value), 0, paAllocation4.Selected.Value),
If(IsBlank(paProject4.Selected.Name), "", paProject4.Selected.Name),
If(IsBlank(paAllocation5.Selected.Value), 0, paAllocation5.Selected.Value),
If(IsBlank(paProject5.Selected.Name), "",paProject5.Selected.Name),
If(IsBlank(paComments.Text),"",paComments.Text),
User().Email
);
Navigate(Thankyou,Fade);
Then in your flow just make sure to check for if inputName is equal to (and then leave the right box blank) for each input and perform actions accordingly
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Try replacing them with Blank() values which should be interpreted correctly:
'133-TimeAllocationMasterFlow'.Run(
If(IsBlank(paEmployee.Text), Blank(), paEmployee.Text),
If(IsBlank(paAllocation1.Selected.Value), Blank(), paAllocation1.Selected.Value),
If(IsBlank(paProject1.Selected.Name), Blank(), paProject1.Selected.Name),
If(IsBlank(paAllocation2.Selected.Value), Blank(), paAllocation2.Selected.Value),
If(IsBlank(paProject2.Selected.Name), Blank(), paProject2.Selected.Name),
If(IsBlank(paAllocation3.Selected.Value), Blank(), paAllocation3.Selected.Value),
If(IsBlank(paProject3.Selected.Name), Blank(), paProject3.Selected.Name),
If(IsBlank(paAllocation4.Selected.Value), Blank(), paAllocation4.Selected.Value),
If(IsBlank(paProject4.Selected.Name), Blank(), paProject4.Selected.Name),
If(IsBlank(paAllocation5.Selected.Value), Blank(), paAllocation5.Selected.Value),
If(IsBlank(paProject5.Selected.Name), Blank(),paProject5.Selected.Name)
)
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Hi,
Thank you for your response.
Tt says there is an invalid number of arguments, which is an error on my side of the flow I need to fix. Once done, hopefully this should work.
Thanks.
Hi,
When I try to submit my PowerApp now, it says there is an invalid parameter for 'text 4' i.e. the drop down field that was left blank. Even though AllowEmptySelections is set to true and Default is " "
Any ideas?
Set the default to Blank() ? Is there any reason you set it to a single space? a single space is not an Empty Selection
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
I've set the default to Blank() but it still comes up with the same error message
Can you run a Monitor session to get details of why it thinks its invalid? Should show in the row where it errors what's wrong
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
It's strange, it says there is no error. I think it is because it doesn't go through when I press submit as it fails. Therefore it doesn't get recorded as an error.
Can you provide the information from the Monitor session that is sent during the onClick event? There should be at least one row for the onclick and then subsequent attempt to patch.
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
User | Count |
---|---|
253 | |
106 | |
94 | |
50 | |
39 |