I see lots of questions on this but none of them help me ☹️
Eree be my problem
The MS form is used the submit records of transactions made which I need to create an item in SharePoint, problem is, if its one or the other type of transactions and not the other, well of course the box is left blank.
So if its a cash transaction only, Invoice, BACS and the others are left blank on the form. Power Automate fails no matter how I try to fix the empty question problem.
Flow...
Outcome...
Please help!
Use Concat() not Concatenate()
Thank you
However i get this error
InvalidTemplate. Unable to process template language expressions in action 'Create_Item' inputs at line '0' and column '0': 'The template function 'Concatenate' is not defined or not valid.'.
I changed concatenate to concat and it ran.
Thank you for your support again
Use the following
if(empty(outputs('Get_response_details')?['body/rad40a6ee51d845089ef88e4b7555be78']),'-0',Concat('-',outputs('Get_response_details')?['body/rad40a6ee51d845089ef88e4b7555be78']))
THAT WORKS PERFECTLY!!!!!! Thank you
Last question - The value in the question on the form is a cash figure. Is there a way of adding a prefix of minus (-) to the answer within the create item field?
THAT WORKS PERFECTLY!!!!!! Thank you 🙂
Last question - The value in the question on the form is a cash figure. Is there a way of adding a prefix of minus (-) to the answer within the create item field?
Ok, I did a sample test. Use this instead
if(empty(outputs('Get_response_details')?['body/rad40a6ee51d845089ef88e4b7555be78']),'0',outputs('Get_response_details')?['body/rad40a6ee51d845089ef88e4b7555be78'])
Hi Paul
Here is a screenshot
It only allows me to save it as valid if i use a comma
What was the invalid error when you copied my expression? There needs to be an equal in there, not a comma. What you listed in your reply isn't the form I gave you.
I'm sorry but it is still invalid.
I have rebuilt the flow and the form to see if there was something wrong somewhere.
I copied your expression with the new dynamic content names:
if(outputs('Get_response_details')?['body/rad40a6ee51d845089ef88e4b7555be78'],'','0',outputs('Get_response_details')?['body/rad40a6ee51d845089ef88e4b7555be78'])
but it was still invalid so I replaced the = with a , which made it valid and it ran perfectly fine when the question on the form was left blank.
When I tested it with a value in the form question the flow failed. It seems I cannot win whichever way round I try it.
Here is the error
InvalidTemplate. Unable to process template language expressions in action 'Create_Item' inputs at line '0' and column '0': 'The template language function 'if' expects three parameter: the condition to test as the first parameter, the value to return if the condition is true as the second parameter, and the value to return if the condition is false as the third parameter. The function was invoked with '4' parameter(s). Please see https://aka.ms/logicexpressions#if for usage details.'.
I assumed the four parameters as noted above in the full expression as
So I removed the second dynamic content name.
if(outputs('Get_response_details')?['body/rad40a6ee51d845089ef88e4b7555be78'],'','0')
The expression was still valid so I tested it again but the flow still failed in both scenarios (with or without a value in the form)
You duplicated the value twice at the end of the code. The code should be
if(outputs('Get_response_details')?['body/r55447d5e8e3b4535a457a145b6bac5cc']='','0',outputs('Get_response_details')?['body/r55447d5e8e3b4535a457a145b6bac5cc'])
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492