Hi,
Hope you are doing well.
I have a application which have multiple leave types, I want to Start and Approval Action depending upon the leave type which is created.
So, I have used a Switch Case Condition.
But I want to create two cases only, One for Time Off and Another for Annual, Casual and Sick Leave.
The Switch Case has only one condition value, *Equals: (Can we type like this >> Annual Leave || Casual Leave).
because I want to make two cases and depending on them, I want to start and Approval process.
Any Help??
Solved! Go to Solution.
Initialize variable with empty value. And then in the condition check for the power apps input option for the type of leave and then set the variable accordingly. After that, check the variable in the switch case condition.
Actually, if you are using the condition, you can check for the type of leave and then directly add the approval in the condition branches without using the switch control.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @MH3
A switch case can have only one value to compare the result with. So you can either replicate for all the same options or initialize a variable action and then add a condition to set this variable value as one of the two values based on the inputs and then do the switch on the variable value.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @yashag2255 ,
I am actually confused, when I select Time Off in PowerApps, only TimeOff related fields are patched into the SP list.
and if the user selects Annual, Sick or Casual, They have same column names which are patched into SP List.
So, how can I set the variable with two values as a String? Like this Initialize Variable >>> ( Type = String, Value = Annual Leave || Casual Leave).
When the item is created it will save the leave type also in SP list. I have to set the Start and Approval Action Details differently for (Time off) and (Annual,Sick and Casual).
Can you please show me via screenshot.
Thanks
You can try something like this:
Replace the compose outputs from the condition to the values that need to be compared from the dynamic selector.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
well, I still didn't got your point sorry.
but do I have to initialize a variable? with two values 1 for Time off and another for Annual || Causal || Sick ?
Initialize variable with empty value. And then in the condition check for the power apps input option for the type of leave and then set the variable accordingly. After that, check the variable in the switch case condition.
Actually, if you are using the condition, you can check for the type of leave and then directly add the approval in the condition branches without using the switch control.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Yes, I did that
Let me show you my flow
Flow Pic 1Flow 1
Flow pic 2Flow 2
Flow Pic 3Flow 3
Flow Pic 4Flow 4
Right Now, this is my Flow, in Flow pic 1 I have used 1 approval and in the details I have inserted all the fields, the fields are empty when the record was created will show empty and those who have data will show the data.
So, the problem is I have to show some title against these values.
If I write,
Time Off Date: Sp Column Value(TimeOffDate)
it will only show Time Off Date: because the SP column value of time off date will be empty, if the user created record for Annual Leave.
Same goes to the other leave type.
Annual, Casual and Sick Leave have same titles and Sp column names, while TimeOff has different titles and SP Column Names.
How can, I fix this with your approach
Help!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
45 | |
16 | |
15 | |
14 | |
13 |
User | Count |
---|---|
78 | |
39 | |
28 | |
21 | |
18 |