I’ve created a variable called FullFileName and I now want to use an expression to say - if the file name is greater than 155 characters, take the first 155, otherwise take the whole name.
Getting an error saying the expression is invalid, can anyone spot what I’m doing wrong?
Solved! Go to Solution.
Hi @gm355 ,
You could take a try with expression below:
if(greater(length(variables('FullFileName')),155),substring(variables('FullFileName'),0,155),variables('FullFileName'))
I have made a test on my side, please refer to screenshot below to create the flow:
The expression in the Compose as below:
if(greater(length(variables('FullFileName')),5),substring(variables('FullFileName'),0,5),variables('FullFileName'))
The flow would run successfully as below:
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @gm355 ,
You could take a try with expression below:
if(greater(length(variables('FullFileName')),155),substring(variables('FullFileName'),0,155),variables('FullFileName'))
I have made a test on my side, please refer to screenshot below to create the flow:
The expression in the Compose as below:
if(greater(length(variables('FullFileName')),5),substring(variables('FullFileName'),0,5),variables('FullFileName'))
The flow would run successfully as below:
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.
User | Count |
---|---|
33 | |
16 | |
15 | |
12 | |
9 |
User | Count |
---|---|
40 | |
20 | |
19 | |
10 | |
9 |