cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KrzysztofFP
Frequent Visitor

Remove value from string

Hi,

 

This is a part of my JSON string

 

"actions": [
{
"type": "Action.Submit",
"data": {
"Environment": "Default-d70890a4-3e",
"ApprovalTitle": "TEST",
"ApprovalLink": "https://flow.microsoft.com/",
"ApprovalName": "19721f7e-8279-4de5",
"OnBehalfOfNotice": "Requested by Krzysztof <k@gmail.com>",
"CreatorName": "Krzysztof ",
"CreatorEmail": "k@gmail.com",
"CreationTime": "\"Thursday, 17 March 2022 12:47 GMT\"",
"MessageTitle": "TEST",
"Details": "Hi,\nThere is a new invoice that needs to be processed by our Finance Team. Please review it (accept/decline). **_You have 5 days to do it_**, if you won't then the invoice submission request will expire (Finance Team will be notified).\n\n**Requester:** ()\n\n**Invoice No:** \n\n**Issue Date:** \n\n**Submit Date:** \n\n**Total cost (net):** \n\n**Description:**\n\n\n**Cost distribution:** \n| MPK | Group | Material, service | Cost | \n|:-----------|:-----------|:-----------|:-----------| \n \n\n\nRegards,\nFinance & Admin Bot",
"Options": [
"Approve",
"Reject"
],
"SelectedOption": "Approve",
"ActionType": 1
},
"title": "Submit"
}
]

 

and i need to remove from it Details item 

 

"Details": "Hi,\nThere is a new invoice that needs to be processed by our Finance Team. Please review it (accept/decline). **_You have 5 days to do it_**, if you won't then the invoice submission request will expire (Finance Team will be notified).\n\n**Requester:** ()\n\n**Invoice No:** \n\n**Issue Date:** \n\n**Submit Date:** \n\n**Total cost (net):** \n\n**Description:**\n\n\n**Cost distribution:** \n| MPK | Group | Material, service | Cost | \n|:-----------|:-----------|:-----------|:-----------| \n \n\n\nRegards,\nFinance & Admin Bot",

 

but i don't have idea how... anybody can help ? 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @KrzysztofFP ,

 

You can use below functions to achieve your need:

concat(first(split(variables('string'),'"Details":')), '"Options"', last(split(variables('string'),'"Options"')))

vjefferni_0-1647844511062.png

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

1 REPLY 1
v-jefferni
Community Support
Community Support

Hi @KrzysztofFP ,

 

You can use below functions to achieve your need:

concat(first(split(variables('string'),'"Details":')), '"Options"', last(split(variables('string'),'"Options"')))

vjefferni_0-1647844511062.png

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,146)