Hi
Im trying to parse output from one compose into another compose but im not sure of the syntax or if it’s possible?
My first compose is looking at an email subject and selects the last characters after a specified string of: “Job “ This works ok J.
The second compose doesn’t, is meant to look at the output of the first compose and give me the all the characters before the specified string of: “
The subject of the email looks like this:
Completed with Exceptions (Server: "BACKUP01") (Job: "ADMIN01-Monday")
My first compose is:
"@last(split(triggerBody()?['Subject'],'Job:'))"
and my next compose which should use the output from my first compose is:
"@first(split(@{outputs('Compose')},'"'))"
I’m pretty sure it’s possible but not entirely sure how to do it. Any help would be greatly appreciated.
Regards
Tyrone
Solved! Go to Solution.
Hi @ CHF,
Could you please share a screenshot of the configuration of your flow?
Do you want to get the value of the Job inside the double quotes such as ADMIN01-Monday from the the subject of the email looks like this:
Completed with Exceptions (Server: "BACKUP01") (Job: "ADMIN01-Monday")
If you would like to get the value of the Job inside the double quotes you could refer to screenshot below to create the flow:
The expression in the Compose as below:
https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language
The flow would run successfully as below:
Regards,
Alice Zhang
Hi
Thank you for your response, I have managed to get it working with your help. Although It did not work correctly first time as I think I changed my first compose slightly but I did manage to get it working by adding a few more steps.
Here is what I did to get it working:
My subject of the email is:
Completed with Exceptions (Server: "BACKUP01") (Job: "ADMIN01-Monday")
Compose:
last(split(triggerBody()?['Subject'],'Job: "'))
Compose2(data1):
substring(outputs('Compose'),0,sub(length(outputs('Compose')),3))
Compose3(day1):
last(split(outputs('data1'),'-'))
Compose4(server):
first(split(outputs('data1'),'-'))
The results:
Compose:
ADMIN01-Monday")
Compose2(data1):
ADMIN01-Monday
Compose3(day1):
Monday
Compose4(server):
ADMIN01
What it looks like:
Thank you so much for your help. I hope this helps other people out.
Regards
Tyrone
To add to this what i get from the second compose is:
"@first(split( "DATABASE02-Monday") ,'"'))"
So its is using the output of the first Compose but it liiks like its not actually doing the "First" split?
Hi @ CHF,
Could you please share a screenshot of the configuration of your flow?
Do you want to get the value of the Job inside the double quotes such as ADMIN01-Monday from the the subject of the email looks like this:
Completed with Exceptions (Server: "BACKUP01") (Job: "ADMIN01-Monday")
If you would like to get the value of the Job inside the double quotes you could refer to screenshot below to create the flow:
The expression in the Compose as below:
https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language
The flow would run successfully as below:
Regards,
Alice Zhang
Hi
Thank you for your response, I have managed to get it working with your help. Although It did not work correctly first time as I think I changed my first compose slightly but I did manage to get it working by adding a few more steps.
Here is what I did to get it working:
My subject of the email is:
Completed with Exceptions (Server: "BACKUP01") (Job: "ADMIN01-Monday")
Compose:
last(split(triggerBody()?['Subject'],'Job: "'))
Compose2(data1):
substring(outputs('Compose'),0,sub(length(outputs('Compose')),3))
Compose3(day1):
last(split(outputs('data1'),'-'))
Compose4(server):
first(split(outputs('data1'),'-'))
The results:
Compose:
ADMIN01-Monday")
Compose2(data1):
ADMIN01-Monday
Compose3(day1):
Monday
Compose4(server):
ADMIN01
What it looks like:
Thank you so much for your help. I hope this helps other people out.
Regards
Tyrone
Hi Alice,
Looking for a solution to an issue I have, I just found this post. I would like to see if you or someone else can help me here. I am doing something similar to what Tyrone was doing but I am not only working with one output but multiples. Let me explain my self.
I am extracting data from an email. The email stores different sales data. For example Gross Sale, Tips, and Tax to name a few. I am using split to extract the values and is working fine but I am doing so much repetitive work and I bet there should be a way to reduce my flow.
Let me explain what I am doing right now:
Step 3 and 4 are the same regardless of the specific word I am working at the moment so I would like to know if there is a way to get the outputs when searching for all the different words but then just using one steps 3 and one step 4 to process all the words instead of repeating steps 3 and 4 for all of the words. This will be clearer once you see the following image:
Step 2 (Unique process for every different word.)
Step 3 (Used on every different word as step 4)
Hope this all make sense 😅
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
41 | |
40 | |
37 | |
34 | |
30 |
User | Count |
---|---|
47 | |
37 | |
35 | |
24 | |
24 |