Catch string value "error" from xml response and check if a control contains that value

  • 2 June 2016
  • 1 reply
  • 2 views

Badge

I have a textbox IBTextBox which contains value:

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><results operation="invokeSync"> <resultStatus>OK</resultStatus> <executionState>FINISHED</executionState> <correlationID>482e65499d50aaf8b157fb8b5e41bb6d65a9cd4898db2e76dede54ca50c2486d</correlationID> <output>  <content>Error</content> </output></results>

 

I want to display a message if IBTextBox contains Error value from above xml. I have tried conditions (marked as 1 – highlighted yellow)

 

  • if control contains specific value
  • if control contains a value

 

But it is not working.


14217i2BD6D3BCC160B691.png
17090i6BE0A870C7BBE53C.png

1 reply

Userlevel 1
Badge +8

Hi,

 

To accomplish this you need to make a few minor tweaks to your approach.

 

First, you will need to not use the "contains" condition but use the "advanced condition in your rule like so:

12992i2816256149E0817D.png

 

Finally, once the advanced condition is set. You should be able to test and get the following results. In my test scenario, using the XML you provided, my message is shown using the advanced condition where the XML contains Error.

16334i2AEB6B1CD633C04D.png

 

Hope this helps.

 

S.

Reply