Solved

Removal of additional characters in output after workflow runs

  • 30 May 2023
  • 5 replies
  • 230 views

Userlevel 1
Badge +9

Hello,

 

I am wondering how to remove additional characters in a workflow to prevent the following output below after the workflow runs???

I tried using the small round Fx button and selected string as default but no luck...

 

 

icon

Best answer by Garrett 30 May 2023, 20:51

View original

5 replies

Userlevel 6
Badge +16

Hi @jpacheco 

That is a Dictionary value. Use the Get Item from Dictionary to extract the value of the key “results”.

 

Get Item from Dictionary
Dict: <state the Dictionary source variable>
Item name: results
Output: CompanyName which should be [“COMPANY NAME”]

 

Then use Regular Expression or replace string to cleanup and get → COMPANY NAME

or use Get Item from Collection at index position 0 on the CompanyName

Userlevel 6
Badge +16

Actually, it can be done with a single Regular Expression action when the start and end anchor (the text structure) is consistent. 

The start anchor is → “result”: [“
and the end anchor is → “]}

 

String: <Your source value>

REPLACE Operation

Pattern: (.+)(\"results\":\"\[\")(.+)(\"]})

Replacement String: $3

Output: <Your output variable>

Userlevel 5
Badge +20

Hi @jpacheco 
Did these solve your question? 

Userlevel 1
Badge +9

@MillaZ ,

Hello. I’m still looking into the response and trying to get the expected result.

Userlevel 1
Badge +9

@Garrett ,

 

ISSUE: REMOVE all characters and grab “Trade Show” (below)

{"__metadata":{"type":"Collection(Edm.String)"},"results":["TRADE SHOW"]}

 

I do apologize for the time it took in getting back to  this but the only success I got in this was:

1.) Creating a variable within my workflow

2.) Use Regular expression

My final result is:

 

Not sure how to remove  :[“”]}

Reply