cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CGILL
Frequent Visitor

Coalesce not behaving as expected

So I'm trying to make use of coalesce to return an alternate string if a field is blank... I've setup the following test flow

Annotation 2019-04-01 162233.png

 

In the Compose 3 action is the following formula, which i would expect to return 'lk' when there is no value of TaskCurrentReported02:

coalesce(body('Parse_JSON')?['TaskCurrentReported02'],'lk')

 In the Compose 2 action is the following formula, which i would also expect to return 'lk' when there is no value of TaskCurrentReported02:

if(empty(body('Parse_JSON')?['TaskCurrentReported02']),'lk',body('Parse_JSON')?['TaskCurrentReported02'])

However when i run the test, i see nothing in the inputs/outputs of Compose 3, but i get the correct answer in Compose 2... I'm trying to save myself what amounts to a ton of writing using Compose 2 method in favor of the shorter/more efficient Compose 3... but if i can't get it working, i guess i'll have to use Compose 2. 

Annotation 2019-04-01 162233.png

Hoping someone can help me understand what is going on here... 

3 REPLIES 3
v-yamao-msft
Community Support
Community Support

Hi @CGILL ,

 

Thanks for feedback.

 

The issue could be reproduced by me.

 

Please use if function as a temporary workaround.

 

I will help confirm this issue and back to you later.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

It's been a few months and I have the same issue now. This renders the coalesce function useless... and leads to much wasted time.

nfranzen
New Member

Two years later and this is still not fixed ?!

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (56,468)