Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Not able to save attribute in delivery input form

rupesh12
Level 2
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
Manoj_Kumar_
Correct answer by
Community Advisor
Community Advisor

Hello @rupesh12 ,

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?


View solution in original post

11 Replies
Manoj_Kumar_
Correct answer by
Community Advisor
Community Advisor

Hello @rupesh12 ,

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?


View solution in original post

rupesh12
Level 2
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

 

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

Hi @rupesh12,

 

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

rupesh12
Level 2
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.

rupesh12
Level 2
Level 2

@Milan_Vucetic 

 

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

Thank you. 🙂

Manoj_Kumar_
Community Advisor
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?
rupesh12
Level 2
Level 2

Hi @Manoj_Kumar_

 

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

Thanks for your help.

Milan_Vucetic
Community Advisor
Community Advisor

Hi @rupesh12 ,

 

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

rupesh12
Level 2
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?