cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sperry1625
Solution Supplier
Solution Supplier

Button Flow Optional Parameters

I have a button flow that accepts two parameters. Both parameters are optional. InspectionId (int) and InspectionMonth (int). I check for null values with coalesce for the parameters. But what I have found is that if I do not supply the InspectionId I get the following error:

Unable to process template language expressions in action 'Initialize_variable_|_ParamInspectionId' inputs at line '0' and column '0': 'The template language expression 'coalesce( triggerBody()['number_1'], 0 )' cannot be evaluated because property 'number_1' doesn't exist, available properties are 'number'. Please see https://aka.ms/logicexpressions for usage details.'.

This only occurs for the InpsectionId parameter. If I leave InspectionMonth parameter blank, the similar evaluation works fine.

I am at a loss. How do I check to see if it exists?

 

Thank you.

 

-S

Regards,

-S

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi  @sperry1625 , 

 

Please try this expression:

coalesce( triggerBody()?['number_1'], 0 )

instead of 

coalesce( triggerBody()['number_1'], 0 )

 

Best Regards,

Wearsky

View solution in original post

1 REPLY 1
v-xiaochen-msft
Community Support
Community Support

Hi  @sperry1625 , 

 

Please try this expression:

coalesce( triggerBody()?['number_1'], 0 )

instead of 

coalesce( triggerBody()['number_1'], 0 )

 

Best Regards,

Wearsky

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (3,986)