I have a flow that reads a SharePoint list and converts that into a CSV table with custom columns. I was trying to take one of the columns and use the substring() function on it to only take the first 90 characters like this:
Substring(@item()?['Justification_x0020_for_x0020_Sp'],0,90)
. However this throws an error when the field is empty or less than 90 characters long. I was going to try and manage this AFTER the CSV table was created but the field is rich text and can contain line feeds so I can't do a split for each row and then try to process each column.
Is there a way to just pull the first X characters of a field in the CSV table step without the substring() function?
Solved! Go to Solution.
You could do this:
if
(
greater(length(outputs('Justification')), 90),
substring(outputs('Justification'), 0, 90),
outputs('Justification')
)
You will need to replace outputs('Justification') with your value.
This checks to see if the string is greater than 90 characters, if it is, it gets the first 90 characters. If it is less than 90, it just outputs the value.
Make sense?
You could do this:
if
(
greater(length(outputs('Justification')), 90),
substring(outputs('Justification'), 0, 90),
outputs('Justification')
)
You will need to replace outputs('Justification') with your value.
This checks to see if the string is greater than 90 characters, if it is, it gets the first 90 characters. If it is less than 90, it just outputs the value.
Make sense?
I thought I tried that and it didn't work, but I wasn't using greater(). It does work now though. Thank you.
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 |
---|---|
71 | |
26 | |
16 | |
16 | |
15 |
User | Count |
---|---|
145 | |
45 | |
44 | |
33 | |
30 |