Hello!
Currently, I am working on points calculation where if the user inputs some variable based on the reference list below through Power Apps connected with SharePoint list, there will be an updated value in the assigned points column.
Here the reference list that required few nested conditions that return different values such as below;
Referring to the image below, I have tried to use the "condition" action;
The above condition able to execute successfully but I have difficulty displaying different output with a different condition?
Anyone who can help me to solve this problem? Thank you in advance!
Solved! Go to Solution.
For your first question:
Do you mean you want to use the actions in flow to replace SubmitForm and UpdateIf in Power Apps?
If yes, could you tell me the detailed scenario of how the flow will be triggered? Because from your first screenshot, you have used the ‘When an item is created or modified’ trigger. May I assume you want to use this trigger?
If no, then I’m afraid you’ll need to post the question relating to Power Apps in the Power Apps forum:
Power Apps Community - Power Platform Community (microsoft.com)
For your second question:
My ‘Compose’ is just an example for ‘Club’ and ‘Society’. And it’s not for dynamic content. Sorry for this confusion.
But I think the action ‘Switch’ suits your need here, so could you please try to use ‘Switch’?
For more info about ‘Switch’: Schema reference for trigger and action types - Azure Logic Apps | Microsoft Docs
And I’ve update my flow using the trigger ‘When an item is created or modified’:
In my test, I’ve just used Points of reference for Clubs/Society/RCSU. But the same logic applies to Points of reference for the others.
The flow is for your reference:
Please make sure the dynamic content ‘EC_PA_Cri’ used in all these ‘Conditions’ are from ‘When an item is created or modified’.
The detailed step of ‘Switch’:
I only create 2 cases for ‘President’ and ‘Vice president’.
Please make sure the dynamic content ‘ID’ in all the steps of ‘Update item’ are from ‘When an item is created or modified’.
The detailed steps for ‘Switch 2’ are almost the same as those for ‘Switch’ except that the ‘EC_PA_Points’ manually input are different.
Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Here the reference list that required few nested conditions that return different values;
It seems like the action ‘Switch’ better suits your case.
I’ve made a test flow and run it successfully.
The list before the flow runs:
The list after the flow runs:
The whole flow is for your reference:
The detailed step for ‘Get item’:
The filter query is:
EC_PA_Cri eq 'RCSU'
‘EC_PA_Cri’ here should be the column field name, and not the display name of the column. You can find the column field name in URL of the column:
For more info about Filter Query:
OData comparison operator reference - Azure Cognitive Search | Microsoft Docs
The detailed steps for ‘Apply to each’:
The detailed steps for ‘Compose’ and ‘Get items 2’:
The expression used in ‘Compose’:
union(array('Clubs'),array('Society'))
For more info about the functions union() and array():
Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs
Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs
The dynamic content ‘Current item’ in ‘Filter Query’ comes from ‘Apply to each 2’.
The detailed steps for ‘Apply to each 3’:
If the problem still exists, please feel free to let me know.
Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-yiwenxie-msft !🤗
Thanks for your detailed response however, I have some inquiries that need your help to clarify.
1. In my findings, manually triggered flow is working for the mobile triggers. However, my project is using Form, SubmitForm and UpdateIf Gallery in Power Apps. Fyi, the flow to calculate the EC_PA_Points is triggered when the user clicks the button SubmitForm and UpdateIf Gallery. May I know if there is another suitable technique that is possible to apply to my project?
2. So far from my readings, the Union function should get all the items in the collection [eg: array ('Clubs'), array('Society')] which it is an array. So my question is how does it work in the "compose" step. For example, how does the "compose" process the data because the variables might not be the same in each case?
Highly appreciate your time and cooperation. Thank you in advance!🤗
For your first question:
Do you mean you want to use the actions in flow to replace SubmitForm and UpdateIf in Power Apps?
If yes, could you tell me the detailed scenario of how the flow will be triggered? Because from your first screenshot, you have used the ‘When an item is created or modified’ trigger. May I assume you want to use this trigger?
If no, then I’m afraid you’ll need to post the question relating to Power Apps in the Power Apps forum:
Power Apps Community - Power Platform Community (microsoft.com)
For your second question:
My ‘Compose’ is just an example for ‘Club’ and ‘Society’. And it’s not for dynamic content. Sorry for this confusion.
But I think the action ‘Switch’ suits your need here, so could you please try to use ‘Switch’?
For more info about ‘Switch’: Schema reference for trigger and action types - Azure Logic Apps | Microsoft Docs
And I’ve update my flow using the trigger ‘When an item is created or modified’:
In my test, I’ve just used Points of reference for Clubs/Society/RCSU. But the same logic applies to Points of reference for the others.
The flow is for your reference:
Please make sure the dynamic content ‘EC_PA_Cri’ used in all these ‘Conditions’ are from ‘When an item is created or modified’.
The detailed step of ‘Switch’:
I only create 2 cases for ‘President’ and ‘Vice president’.
Please make sure the dynamic content ‘ID’ in all the steps of ‘Update item’ are from ‘When an item is created or modified’.
The detailed steps for ‘Switch 2’ are almost the same as those for ‘Switch’ except that the ‘EC_PA_Points’ manually input are different.
Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Yes true that I am using SubmitForm and UpdateIf.
Plus, highly appreciate your suggestion for a Switch case which suits my requirements.
A big thanks again @v-yiwenxie-msft for your amazing 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 |
---|---|
69 | |
22 | |
16 | |
16 | |
11 |
User | Count |
---|---|
123 | |
37 | |
32 | |
30 | |
27 |