Forum Discussion

nocturnalgeorge's avatar
13 years ago

Splitting property transfer results

Hi,

Can anybody help with splitting results from a property transfer?

i.e.

If my response is:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<CurrenciesResponse xmlns="http://webservices.cloanto.com/currencyserver/">
<CurrenciesResult>AED;AFN;ARS;AUD;AZN;BBD;</CurrenciesResult>
</CurrenciesResponse>
</soap:Body>
</soap:Envelope>

and I have a Property Transfer of

declare namespace soap='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace ns1='http://webservices.cloanto.com/currencyserver/';
//ns1:CurrenciesResult

I get an expected transfer to Currency1 of
AED;AFN;ARS;AUD;AZN;BBD

Now is there an easy way for me to split the properties returned so I could store them in
Currency1 AED
Currency2 AFN

etc

Any ideas or help very much appreciated!
  • tjdurden's avatar
    tjdurden
    Frequent Contributor
    Hi,

    Just an idea:

    Transfer the XPath values into a Property, then use Groovy script to:
    - Read the property value, store as string.
    - Split string by semi-colon and store into an array.
    - Create new Property for each array item.
    Then use each Property as/where you need it.

    Best wishes,
    Tim