I'm using compose and join to display optional answers from 2 questions in form but I can't get the flow to work if there is null (no answers).
I'm not to sure how to write the expression - currently using contains but should i be using coalesce?
My expressions are as follows:
Compose1
if(contains(triggerOutputs('Get_response_details')?['body/r8d6acc68f2dd4b9fa1290c575d4cac19'], triggerOutputs('Get_response_details')?['body/re36471ebb5764466b7bc5c3392d10739'], null))
Join1
json(outputs('Compose1'))
Any help is appreciated 🙂
Solved! Go to Solution.
Hi @YAMess ,
Do you want to concatenate the answers to the two optional questions with two newline labels?
I have made a simple test for your reference.
if(empty(Question1),null,Question1)
if(empty(Question2),null,Question2])
if(or(empty(Question1),empty(Question2)),replace(outputs('Compose'),'</br></br>',''),outputs('Compose'))
Result Screenshots:
Best Regards,
Charlie Choi
Hi @YAMess ,
Do you want to concatenate the answers to the two optional questions with two newline labels?
I have made a simple test for your reference.
if(empty(Question1),null,Question1)
if(empty(Question2),null,Question2])
if(or(empty(Question1),empty(Question2)),replace(outputs('Compose'),'</br></br>',''),outputs('Compose'))
Result Screenshots:
Best Regards,
Charlie Choi
User | Count |
---|---|
88 | |
39 | |
23 | |
20 | |
16 |
User | Count |
---|---|
127 | |
49 | |
46 | |
33 | |
25 |