My flow is processing all pages found in a SharePoint folder. It's using two fields defined as "Page Details" for each page. I want to use the trim( ) function to remove extraneous spaces that my users tend to include. So I need to pass the "Page Detail" property named "Book Label" as the parameter to the trim( ) function.
So, as the first step after "Get file properties" in my loop, I created a "Set Variable" object. To enter the "Value", I select the Expression column on the "Add dynamic content" popup and selected the trim( ) function. I end up with "trim( )". I put the cursor between the two parentheses and select the "Dynamic content" column. Then I select the "Book Label" entry below "Get file Properties".
I end up with trim(outputs('Get_file_properties')?['body/BookLabel']) in the "fx" field of the Add dynamic content" popup. Then I select OK and the value is written back to the Set Variable value input box.
When I run this flow, it fails with the error message of:
Unable to process template language expressions in action 'Set_strBookLabelTrimmed' inputs at line '1' and column '20464': 'The provided parameters for template language function 'trim' are not valid.'.
Solved! Go to Solution.
Hello @DonArnett ,
trim function takes in string values, so if yo are using it correctly, the reasons that you may be getting this error are
You can check what value you are getting for this parameter in the outputs of Get File Properties
Please hit Kudos or Accept this Reply as Solution if it resolved your problem.
Hello @DonArnett ,
trim function takes in string values, so if yo are using it correctly, the reasons that you may be getting this error are
You can check what value you are getting for this parameter in the outputs of Get File Properties
Please hit Kudos or Accept this Reply as Solution if it resolved your problem.
Thanks for the reply. The solution was to call the string( ) function. My expression ended up like:
trim( string( variables('strBookLabelFromPage') ) )
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
43 | |
17 | |
15 | |
14 | |
13 |
User | Count |
---|---|
75 | |
38 | |
27 | |
20 | |
18 |