Parsing text using delimited text (pattern designer) Jakarta

d_hertel
Mega Contributor

I'm trying to parse text following ITOM > Service Mapping docs (Jakarta) while in Debug mode.   Step 3 of procedure states:    

To define parse the file and extract the string as a variable from within Debug mode:

  1. Select the string to be parsed in the text box.All settings are automatically entered in the variable fields.
  2. Provide a unique and meaningful name for the variable and click OK. The variable is added to the Variables table.

Indeed, selecting a portion of a text string creates a dialogue box to pop up with a default variable name.   But I never see an "OK" button, nor does the variable actually get saved to the variables list.   Has anyone successfully used the specific steps outlined in step 3?     It seems like a helpful procedure to define a variable related to a portion of the text file... but ... not sure it works...

7 REPLIES 7

Marlos
ServiceNow Employee
ServiceNow Employee

Hi Dave,



You just need to press enter after you highlight the value from the parsed file:



find_real_file.png



Then the variable will show up in the pane on the right:



find_real_file.png



Make sure you choose the right parsing strategy for your file.


d_hertel
Mega Contributor

Hi Marlos,     Thanks for the reply, but that is definitely NOT my experience.



When I highlight text, the dialogue box pops up to enter a variable name.... and I enter whatever.... but as soon as I hit enter, this error message occurs at the top of page and the variable is not added to the vars list.    



find_real_file.png


Hi Dave,



It is not mandatory that in all the case, you can fetch required value in debug mode. Your error message is clearly saying that system is not able set automated strategy based on your selected string. As per my experience this method works only when your file is linear format like xml file. In Marlos's screenshot you will find he is working with XML file. So in his example all values has been selected which are falls between <param-value>Selected String</param-value>.



What i will suggest is you go with step 4 instead of going with step 3 in this doc Service Mapping docs .



Hope this will help.



Let me know if you need any help in execution of step 4.



Thanks,


Nimmi


Hi Nimmi -- yes, that makes sense and yes I noticed the earlier example from Marlos was using an XML file.       I appreciate your reply & feedback.



Finally, yes, I've been using the approach in step 4     I was just questioning why step 3 doesn't seem to work reliably.


(side note: there is no "OK" button either... so the online doc needs some tweaking to be accurate )



Thanks again - Dave