Information
This version of the product has reached end of support. The documentation is available for your convenience. However, you must be logged in to access it. You will not be able to leave comments.

Parsing responses for instance IDs in SilkPerformer scripts


The response to most BackChannel ServerRunProcess requests includes an instance ID. This is a typical response:

this.result="SR00142215278Bp3AeRgq2xXBQ04K";

Because the response is simple, you can parse it directly by using the WebParseDataBoundEx function and then saving the response to a variable. Use WebParseDataBoundEx immediately before the WebRemedyBackChannelUrl function. For example:

WebParseDataBoundEx(gsSRInstanceID01, STRING_COMPLETE, "this.result=\"", 1, "\"", WEB FLAG IGNORE WHITE SPACE, 1);
WebRemedyBackChannelUrl("http://standardhost/arsys/BackChannel/", "BackChannel - ServerRunProcess (#1)", ARSYS_BACKCHANNEL 033);

The WebParseDataBoundEx function can parse and save only to one variable. To parse for many items in a response, save the entire HTTP response to a variable and write your own parsing function (for an example, see 2021-12-07_23-10-13_Parsing AR System table entries in SilkPerformer scripts).

To save the HTTP response to a variable, use WebParseDataBound immediately before the WebRemedyBackChannelUrl function. For example:

WebParseDataBound(buffer,sizeof(buffer), Null, Null);
WebRemedyBackChannelUrl("http://standardhost/arsys/BackChannel/",  "BackChannel - GetTableEntryList (#1)", ARSYS BACKCHANNEL 027);
parseRequestList(buffer);

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

AR System 21.3