Hi Team,
I'm trying to achieve an scenario where there are 5 different fields with different name for example A,,B,C,D,E,F and they are Boolean valued
now I want to send email where there will be title as XYZ and if any of the field value is true then it should be appended under XYZ if not the email should be null as shown below if A and B was selected as true then in email XYZ= A,B
can I get the solution for this please
Solved! Go to Solution.
Hi @Ashwinreddy :
I've made a test for your reference:
My flow:
I set an object type variable "TheVar" to simulate the situation you describe.
Reference Expression:
concat(
'XYZ=',
if(variables('TheVar')['A'],'A',''),
if(variables('TheVar')['B'],'B',''),
if(variables('TheVar')['C'],'C',''),
if(variables('TheVar')['D'],'D',''),
if(variables('TheVar')['E'],'E','')
)
The Result:
Best Regards,
Bof
You can declare a string variable and then add conditions to check if each boolean field is true or not. If yes, use append to string variable action and append field name.
Finally add a condition to check if string variable is not empty. If not empty, send email and add string variable.
Hi @Ashwinreddy :
I've made a test for your reference:
My flow:
I set an object type variable "TheVar" to simulate the situation you describe.
Reference Expression:
concat(
'XYZ=',
if(variables('TheVar')['A'],'A',''),
if(variables('TheVar')['B'],'B',''),
if(variables('TheVar')['C'],'C',''),
if(variables('TheVar')['D'],'D',''),
if(variables('TheVar')['E'],'E','')
)
The Result:
Best Regards,
Bof
You should not add anything inside else part .. refer below
Something like below.. Please ensure that closing brackets match...
concat(
'XYZ=',
if(variables('TheVar')['A'],'A',
if(variables('TheVar')['B'],'B',
if(variables('TheVar')['C'],'C',
if(variables('TheVar')['D'],'D',
if(variables('TheVar')['E'],'E','')))))
)
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Read the latest about new experiences and capabilities in the Power Automate product blog.
User | Count |
---|---|
25 | |
25 | |
25 | |
22 | |
15 |
User | Count |
---|---|
50 | |
38 | |
36 | |
31 | |
30 |