What am I doing wrong?
if(length(outputs('Execute_stored_procedure_(V2)_-_Create_projects_in_database')?['body/outputparameters/outputContactFirstName'])=0, triggerBody()?['contactFirstname'], outputs('Execute_stored_procedure_(V2)_-_Create_projects_in_database')?['body/outputparameters/outputContactFirstName'])
I keep getting an 'The expression is invalid' error.
length() returns explicit numerical values, does it not?
I think generally speaking the '=' sign assigns values to a variable, it does not compare them. When you need to start compare values, the 'equals' function is more appropriate.
No Words, the language doesn't handle simple equalities?! You need to use a function. OMG.
At least I learnt something new today.
You should replace "=" by using "equals" function:
if(equals(length(outputs('Execute_stored_procedure_(V2)_-_Create_projects_in_database')?['body/outputparameters/outputContactFirstName']),0), triggerBody()?['contactFirstname'], outputs('Execute_stored_procedure_(V2)_-_Create_projects_in_database')?['body/outputparameters/outputContactFirstName'])
Hope it helps!
Ferran
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492