Expand my Community achievements bar.

SOLVED

ACC data-nl tags in webapps

Avatar

Community Advisor
Hi All,
 
I am trying to get a webapp with the new page activity to store user submitted data (just a few marketing preferences flags) into a custom schema and I am having trouble making it work.
 
  1. I have set the webapp's document storage type to my custom schema
  2. I've updated the checkboxes to point to the xpath of the mkt flags
    1. e.g. <input class="custom-control-input" id="uni_news" type="checkbox" checked="checked" data-nl-bindto="xpath" data-nl-xpath="@uosUniversityNews" data-nl-label="University news" />
The webapps keeps popping up errors
david_garcia1_0-1610116745854.png

 

david_garcia1_1-1610116804203.png

 

 
Context: There is an existing webapp used for recipients to submit their marketing preferences to news and subscriptions, and the nl-data tags can be bound very easily to the ootb recipient schema
<div class="custom-control custom-checkbox mr-sm-2 align-items-right"><input class="custom-control-input" id="uni_news" type="checkbox" checked="checked" data-nl-checkboxbehavior="subscription" data-nl-servicename="uosUniversityNews" data-nl-servicelabel="University news" data-nl-bindto="service" /> <label class="custom-control-label" for="uni_news">Yes</label></div>
 
So now I want to modify it to write to a custom schema?? isnt data-nl tags supposed to allow me to easily achieve this? or Im I missing something.
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

 

The validation is checking that the xpath is in the webApp's Document type, set in Properties.

If the field is in a custom schema that's different from Document type, you'll have to link the two and set xpath accordingly.

 

Thanks,

-Jon

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi,

 

The validation is checking that the xpath is in the webApp's Document type, set in Properties.

If the field is in a custom schema that's different from Document type, you'll have to link the two and set xpath accordingly.

 

Thanks,

-Jon

Avatar

Employee
Hi Wood, thanks for your reply, found out the issue was that the schema had the view attribute set to true and therefore that prevented the database structure update, after removing the view attribute and updating it worked.

Avatar

Employee

I am having another issue, I am preloading the data for those flags into the webapp context, however, the front end checkbox are not reflecting the values, this is happening on a custom schema for boolean data type, seems that the string preloads data just fine. my question is here https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/preloading-values-...

 

During my tests, it seems that the issue is preloading to checkboxes, as I created a simple webapp with fields and checkboxes, all the strings loaded on the text fields, but none for the boolean data type into checkbox, this happens with the new page activity.