BookmarkSubscribeRSS Feed
vasuthevan
Calcite | Level 5

Hi All,

 

In the reply node we have a field with "Char list" data type.

We need to map a "date" field to this, hence we used TOString function available in the calculated variable.

 

function used:  TOSTRING(TOSTRING(<<package.packageTags.Offer Expiry Date>>))

 

The problem is in the response XML the value is coming inside { } brackets.

 

<ns2:Data name="OfferResponseValue11">
<ns2:StringArray>
<ns2:Val>
<ns2:Item>{ 2018-12-31T00:00:00+11:00 2018-12-31T00:00:00+11:00 }</ns2:Item>
</ns2:Val>
</ns2:StringArray>
</ns2:Data>

 

Instead of 

 

 

<ns2:Data name="OfferResponseValue11">
<ns2:StringArray>
<ns2:Val>
<ns2:Item>2018-12-31T00:00:00+11:00</ns2:Item>

<ns2:Item>2018-12-31T00:00:00+11:00</ns2:Item>
</ns2:Val>
</ns2:StringArray>
</ns2:Data>

 

Could you please advice.

 

Thanks

3 REPLIES 3
JamesAnderson
SAS Employee
HI vasuthevan,
I think you are going to have a problem with your approach. The package.Tags is an array (or List), so when you pass this to the TOSTRING function, it converts the whole array to a string, and encloses it in curly braces. There are no functions available to convert a whole array to one of another type.
My only suggestion it to change the Custom Detail on your treatment to be a Character, then when assigning the value use a Calculated item with a date literal or date function to create the date, and then use TOSTRING function to convert it to a Character (whilst still inside the Calculated Item). Then the packageTag will be a Character List and will map directly to your reply variable.
Rgds
James
vasuthevan
Calcite | Level 5

Hi James,

 

Thanks a lot for replying.

 

As suggested we created a char field in custom detail group and  and assigned the  value for the Char filed using the below function. And this field we used in the reply node directly.

 

TOSTRING(<<campaign.campaignTags.Offer Expiry Date>>)

campaign.campaignTags.Offer Expiry Date /* This Filed is available in the same treatment as a date field*/

 

But we are getting the response as below.

 

<ns2 :Data name="OfferResponseValue11">
<ns2 :StringArray>
<ns2 :Val>
<ns2 :Item>.</ns2:Item>
<ns2 :Item>.</ns2:Item>
</ns2 :Val>
</ns2 :StringArray>
</ns2 :Data>

In "RTDMCDM"."CI_DYNAMIC_TREATMENT_ATTR_EXT" table also .(dot) is inserted for this column.

 

 

We tried using TOstring(current Datetime). This is working.

Only problem is when we use fields available in the same treatment to assign the value for another field the value is coming as NULL.

 

Could you please advice.

 

Thanks,

Vasu

 

JamesAnderson
SAS Employee
Hi,
Sorry - but your new example confuses me. Can you try using a Character Custom detail inside a treatment (ensuring you have created a Custom Detail Tag and attached it to the new Custom Detail), assign its value using a calculated item with the TOSTRING function, and then assigning the packageTag in the reply.
Regards
James

G2 Grid Leader Spring 2025.png

 

 

 

 

Want to review SAS Customer Intelligence 360? Gartner and G2 are offering a gift card or charitable donation for each accepted review. Use this link for G2 to opt out of receiving anything of value for your review.

 

Gartner.jpg

 

SAS Customer Intelligence 360

Get started with CI 360

Review CI 360 Release Notes

Open a Technical Support case

Suggest software enhancements

Assess your marketing efforts with a free tool

 

Training Resources

SAS Customer Intelligence Learning Subscription (login required)

Access free tutorials

Refer to documentation

Latest hot fixes

Compatibility notice re: SAS 9.4M8 (TS1M8) or later

How to improve email deliverability

SAS' Peter Ansbacher shows you how to use the dashboard in SAS Customer Intelligence 360 for better results.

Find more tutorials on the SAS Users YouTube channel.

G2 Grid Leader Spring 2025.png

 

 

 

 

Want to review SAS Customer Intelligence 360? Gartner and G2 are offering a gift card or charitable donation for each accepted review. Use this link for G2 to opt out of receiving anything of value for your review.

 

Gartner.jpg

 

SAS Customer Intelligence 360

Get started with CI 360

Review CI 360 Release Notes

Open a Technical Support case

Suggest software enhancements

Assess your marketing efforts with a free tool

 

Training Resources

SAS Customer Intelligence Learning Subscription (login required)

Access free tutorials

Refer to documentation

Latest hot fixes

Compatibility notice re: SAS 9.4M8 (TS1M8) or later

Discussion stats
  • 3 replies
  • 1571 views
  • 1 like
  • 2 in conversation