Expand my Community achievements bar.

SOLVED

Not able to save attribute in delivery input form

Avatar

Level 2

Hi,

 

I have created smsInformation attribute in delivery schema and added it in xpathsToLoad and xpathsToLoadOpt inside nms:delivery input form.

 

Added below code in nms:delivery input form-

<container img="xtk:text.png" label="Text content" name="tabSMS" readOnlyIf="[/tmp/@readOnly] or ([/ignored/@limitEdition] and [/ignored/@contentStatus]!=10)">
<container>
<input label="SMS Information." xpath="/@smsInformation"/>
</container>
<input fullToolbar="true" htmlMode="false" name="ctSource" nolabel="true"
type="htmlSource" xpath="../content/sms/source" xpathInsert="/ignored/customizeSMSContent">
<container>
<input menuId="deliveryMenuBuilder" type="customizeBtn" xpath="/ignored/customizeSMSContent"/>
</container>
</input>
</container>

 

Below is delivery template-

rupesh12_0-1589814943815.png

 

When I type data in SMS information attribute, save the delivery and re-open it the atrribute looks blank.

Please let me know why data not getting save in sms information attribute.

 

Thanks,

 

 

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @tejashri12 ,

Can you please share the error you are getting while saving the input form.

i believe the error is at the xpath for smsinformation input. Can you double check if the xpath is correct?



     Manoj
     Find me on LinkedIn

View solution in original post

12 Replies

Avatar

Correct answer by
Community Advisor

Hello @tejashri12 ,

Can you please share the error you are getting while saving the input form.

i believe the error is at the xpath for smsinformation input. Can you double check if the xpath is correct?



     Manoj
     Find me on LinkedIn

Avatar

Level 2

Hi @Milan_Vucetic and @_Manoj_Kumar_ 

 

I checked, smsInformation field is updated in schema. Previously I was not getting any error in delivery input form or delivery template.

Since I changed xpath to "@smsInformation", while opening the sms delivery template I'm getting below error.

 

rupesh12_0-1589867123345.png

 

Avatar

Community Advisor
Can you please share the schema screenshot and input form screenshot? Error is related to smsParameters instead of smsInformation

     Manoj
     Find me on LinkedIn

Avatar

Community Advisor

Hi @tejashri12,

 

all fields in /smsParameters are stored in XML (not in separate database columns). Your container is probably under parent container which is referenced to /smsParameters and form is looking your new field in wrong place. Move it or set full location <input label="SMS Information." xpath="/delivery/@smsInformation"/>

 

Regards,

Milan

Avatar

Level 1

Hi Milan, the above logic is not working for me , can you please help me

 

Avatar

Level 2

Hi @_Manoj_Kumar_ 

 

Below are schema and delivery input form screenshot

delivery schema:

rupesh12_0-1589898501066.png

I tried below logic as also in schema but it didn't work

rupesh12_2-1589898992327.png

 

delivery input form

rupesh12_1-1589898619511.png

Please let me know if I missed anything.

Avatar

Level 2

@Milan_Vucetic 

 

The logic <input label="SMS Information." xpath="/delivery/@smsInformation"/> is working.

Thank you.

Avatar

Community Advisor
I see that you are extending the delivery schema and trying to add new column smsInformation. The first screenshot looks good where you are directly adding the smsInformation attribute. In this case the xpath in input form will be @smsInformation. Can you try to update the schema where you have the attribute smsInformation without the smsParameter thing? and then use the @smsInformation xpath in input form?

     Manoj
     Find me on LinkedIn

Avatar

Level 2

Hi @_Manoj_Kumar_

 

I tried <input label="SMS Information." xpath="/delivery/@smsInformation"/> and it works.

Thanks for your help.

Avatar

Community Advisor

Hi @tejashri12 ,

 

if you created attribute @smsInformation in the main tree in nms:delivery schema you should address it with: <input label="SMS Information." xpath="@smsInformation"/>

Before that, check if you Updated database structure (if new column is reflected to DB not only in the schema).

 

Regards,

Milan

Avatar

Level 2

@Milan_Vucetic @_Manoj_Kumar_ 

 

I have sms delivery template as below-

rupesh12_0-1589903049169.png

 

 

When I type text on SMS content (like Test email) attribute it should automatically reflect on optout information, the one which I greyed out.

Could you please help here?