@locallyhostedbo
Split Subject Line
First, you need to split the subject line by the pipe. Use an expression. For my example, I'm using a Compose action to hold your sample subject line.
Add a Compose action and use the split() function. The split() function takes two parameters. The string and the separator:
split([string],[separator])
For my expression I've inserted the outputs from the Compose action above (you can insert the subject line from your email). Then, insert the pipe character between single quotes.
split(outputs('Compose_-_Subject_Line'),'|')

Give it a test. The split() function will split your subject line at the |.

Access Array Items
Your subject line is now an Array. To access each part of the array, you need an expression. Arrays start at [0], [1], [2].. etc.
To get the first item of the array you need to start with:
?[0]

Place your cursor at the start of your expression and click on the Dynamic content tab. Insert the outputs from the Compose action that is storing the subject line array.

Switch back to the Expression tab and wrap the entire expression in a trim() function. This will remove any spaces before/after your string of text.

trim([insert the Compose action with the split() function here]?[0])
Repeat for each part of your Subject line.

Run a test to confirm the outputs of the Compose action.
You can then use the outputs of those compose actions in your Update/Create Item action.
Hope this helps!
If I helped you solve your problem—please mark my post as a solution ✅. Consider giving me a 👍 if you liked my response!
|