Jump to content

Service Manager > Application > String Utilities > Regex Substring. "Failed": not giving an output for known valid regex


Recommended Posts

Posted

I am concerned there is something wrong with this utility

This basic flow:

  1. Asks agent to select a team (user group picker) and Coworker (user picker)
  2. One node then uses String Utils > Substring to remove the urn:sys bit from the groupID to give the group ID - success
  3. One node then uses String Utilities > Regex Substring to extract the email address from the output of the user picker - fail
  4. Both results are output to the timeline
  5. Node then tries to assign using the extracted values. The assignment to team succeeds but obvs does not do the owner

image.png.7720c30283eaf6c09831e09513010e32.png

This is the extract node that fails:

image.thumb.png.7009e25f6bac18825681a0da52b4a1fe.png

This is the Input Text:

&[functions.getTaskAnswers("task-73baca57").VAROwner]

The value of that as selected by the Human Task User Picker is:

Harry Potter (Harry Potter@domain.gov.uk)ICT - PMO Lead

That is valid Regex:

image.png.bdc0622c87b62e607de4d52cfa1a7502.png

And the pasted timeline output for the result:

image.png.cc7045c292784b9bbf16181dc172cb73.png

Posted

It reveals the issue I was having!

The string displayed on the timeline for the selected Owner is the DISPLAY "Harry Potter (HarryPotter@domain.gov.uk)Minister of Magic" value. The string it takes into the extract was just the VALUE "HarryPotter@domain.gov.uk" and thus the stringutil was unnecessary and blanking the value.

This is bizarre behaviour: the timeline auto-updates with the 'display' value as the outcome when the Human Task is completed but the variable passed to any node where we select it gets the 'Raw'; but we don't get a choice.

I got confused and made an error reporting this but his has not been helped by a long-standing UI inconsistency that I want improved. If both data fields (display and value) are captured, why are we still unable to "inject" or "overwrite" both 'raw' and 'display' values. I'll add an enhancement request from this.

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...