Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

(JWT) does Parse field for extracting data work on URL fields?

wesley.segafredo September 14, 2020

I'm currently using the Parse field for extracting data post function but can't get it to work on a URL.

  • Source - URL field
  • Leading delimiter - using literal text
  • Format of the value to be extracted - any text
  • Target field - text field (single line)

 

Is there something obvious I'm missing? Is the problem that the target field isn't a URL field?

1 answer

1 accepted

2 votes
Answer accepted
Jona Ittermann [Decadis AG]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 14, 2020

Hi @wesley.segafredo

is there any specific reason you are using the "Parse field for extracting data" post function? If I got you right, you just want to copy the URL from Field1 to Field2, right?

 

In this case our "Update issue fields" post function might fit a bit better. The configuration for this would be:

  • Target field: Your text field -> Hit the Add button
  • In the opening popup set:
    • Value type: Field in current issue
    • Source field: Your URL field

The configuration should then look something like this:update-fields.PNG

Please let me know, if this works for you or if you need further help here!

 

Cheers

Jona with the xApps team

wesley.segafredo September 15, 2020

In my URL, it's formatted https://abc/view/number

I was trying to pull just the number portion into a new field. Is there a better way to try to perform this action?

Jona Ittermann [Decadis AG]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 15, 2020

Thank you for the clarification. In this case we can use the following config:

  • Same post function like above
  • But now select for the Value Type Parsed text (advanced mode)
  • Enter the following expression:
replaceAll(%{nnnnn}, "((?:.*)\/)", "")

and replace nnnnn with the field code for your URL field (you can select the field in the dropdown "String field code injector").

This expression will only parse the part after the last / to the text field.

The configuration should look like this:

update-fields.PNG

 

Cheers

Jona

Suggest an answer

Log in or Sign up to answer