Skip to main content
Nintex Community Menu Bar
Solved

Removal of additional characters in output after workflow runs

  • May 30, 2023
  • 5 replies
  • 340 views

Forum|alt.badge.img+11

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...

 

 

Best answer by Garrett

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>

5 replies

Garrett
Forum|alt.badge.img+16
  • Scout
  • May 30, 2023

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


Garrett
Forum|alt.badge.img+16
  • Scout
  • Answer
  • May 30, 2023

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>


MillaZ
Nintex Employee
Forum|alt.badge.img+22
  • Nintex Employee
  • June 5, 2023

Hi @jpacheco 
Did these solve your question? 


Forum|alt.badge.img+11
  • Author
  • Scout
  • June 5, 2023

@MillaZ ,

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


Forum|alt.badge.img+11
  • Author
  • Scout
  • August 4, 2023

@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  :[“”]}