Just wanted to share this workflow that I used to get a specific data from a field that uses ';' to separate inputs.
Ex input: Manager;Donald Duck;Donald@gmail.com
The formula below will show the 2nd input (Donald Duck) as an output if it detects at least 2 ';' are inside the string and if it only detect 1 or less ';' it will output a blank field.
CASE
WHEN Charindex(';',[@field:Original_value], 0) > 0 AND Charindex(';',[@field:Original_value], (Charindex(';',[@field:Original_value])+1)) > 0 THEN Substring([@field:Original_value], (Charindex(';',[@field:Original_value], 0)+1), (Charindex(';',[@field:Original_value], (Charindex(';',[@field:Original_value])+1))-Charindex(';',[@field:Original_value], 0)-1))
WHEN Charindex(';',[@field:Original_value], 0) = 0
THEN ''
END
table snippet:
Just a note: You can edit this formula to check for other delimiters not just ';'
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
Wikiwi
Just wanted to share this workflow that I used to get a specific data from a field that uses ';' to separate inputs.
Ex input: Manager;Donald Duck;Donald@gmail.com
The formula below will show the 2nd input (Donald Duck) as an output if it detects at least 2 ';' are inside the string and if it only detect 1 or less ';' it will output a blank field.
CASE
WHEN Charindex(';',[@field:Original_value], 0) > 0 AND Charindex(';',[@field:Original_value], (Charindex(';',[@field:Original_value])+1)) > 0 THEN Substring([@field:Original_value], (Charindex(';',[@field:Original_value], 0)+1), (Charindex(';',[@field:Original_value], (Charindex(';',[@field:Original_value])+1))-Charindex(';',[@field:Original_value], 0)-1))
WHEN Charindex(';',[@field:Original_value], 0) = 0
THEN ''
END
table snippet:
Just a note: You can edit this formula to check for other delimiters not just ';'
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.