O'Neil Tomlinson
O'Neil Tomlinson

Reputation: 898

Checking if query string exist in Logic App HTTP Request

How do i check if a query string exist in a Logic App HTTP Request? I know how to get the value if it exist triggerOutputs()['queries']['name'] but not sure how to check if its null as the parameter is optional

Upvotes: 2

Views: 2447

Answers (1)

felixmondelo
felixmondelo

Reputation: 1474

You have to use ? operator, for example:

trigger().outputs?.queries?.name

Also, you can use coalesce if you want to get other value, if name is null:

@coalesce(trigger().outputs?.queries?.name, 'my t value instead of name') 

Upvotes: 5

Related Questions