Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
list-to-replicant?
war
I am working with DD5.2 and trying to use the list-to-replicant function to deploy multiple values of a DCR to the database.
Here is the DCR XML:
<item name="Personalization">
<replicant min="1" max="1">
<item name="Geography">
<label>Geography</label>
<description>Show Contact Lilly Page to these states</description>
<database searchable="t" deploy-column="t" />
<inline command = '/opt/ISG/iw-home/iw-perl/bin/iwperl
/opt/ISG/iw-home/local/config/lcv2/custom/bin/db_select.ipl geography t'/>
</item>
</replicant>
</item>
Here is the dbschema format for this element:
<group name="LCN2_CNTNT_LCLTY" table="LCN2_CNTNT_LCLTY" root-group="no">
<attrmap>
<column name="CONTENT_ID" data-type="VARCHAR2(128)" value-from-field="path" allows-null="no"/>
<column name="LOCALITY_ID" data-type="INTEGER" list-to-replicant="yes" list-field="Geography" value-from-field="Personalization/[0-0]/Geography" allows-null="no" is-replicant="yes"/>
</attrmap>
<keys>
<primary-key>
<key-column name="CONTENT_ID"/>
<key-column name="LOCALITY_ID"/>
</primary-key>
<foreign-key parent-group="LCN2_CNTNT">
<column-pair parent-column="CONTENT_ID" child-column="CONTENT_ID"/>
</foreign-key>
</keys>
</group>
Here is the error message in iwddlogs:
INSERT:INSERT INTO LCN2_CNTNT_LCLTY(CONTENT_ID,LOCALITY_ID) VALUES (?,?)
Column: CONTENT_ID, field: path, Index: 1,Converting 'templatedata/TL_Symbyax/contact_lilly/data/contact1' to VARCHAR
ERROR:NumberFormatException occured while converting [2, 3] for column [LOCALITY_ID].
Column: LOCALITY_ID, field: Personalization/0/Geography, Index: 2,Converting '2, 3' to DECIMAL
*******************************************************
SQLException occured in TDbSchemaGroupCfg
Exception Message: ORA-01722: invalid number
Vendor Error Code: 1722
SQL state: 42000
*******************************************************
Any help would be much appreciated!!
thanks
Find more posts tagged with
Comments
Migrateduser
Increase the range from [0-0] to a value equal to the maximum possible comma separated values you can have in field Geography. Eg: if you can have 5 comma sep fields for geography then change the range from 0-0 to 0-4
<column name="LOCALITY_ID" data-type="INTEGER" list-to-replicant="yes" list-field="Geography" value-from-field="Personalization/[0-0]/Geography" allows-null="no"..
ProfessorX
Sometimes if I get real stuck.
I let DD create the tables for me first then take from there. If the table you speicify in you DD CFG is not there DD will create it
The Professor-
lukemelia
i'm having a problem with list-to-replicant where the list is an optional field. It's ok for the user to select nothing. But datadeploy considers this a tuple where the value is null. My relationship table naturally doesn't accept nulls. so the deploy fails. any ideas?
Migrateduser
Well, if you set a column as non-nullable then make sure that you provide a value else alter the table to make the specific column nullable.
bikerider
I have the same problem. What I have found is that if you change the list-field in your deploy to:
list-field="Personalization/0/Geography"
...then DD will translate the list to values. However, in my case I have 0-300 replicants. My little test example only gets the first one. THIS IS ONLY A HACK to see if I can indead get the list-to-values function to work. This *may* fix your problem since you only have one replicant. I'm going to file a bug report since I believe list-field is not handling the array designators, e.g. 0-300, like it does for value-from-field.
Migrateduser
Replicants in list fields was not supported in DD5.6 it is now supported in DD5.6 SP1. Please use DD5.6 SP1 to use replicants in list-fields also check the manual for usage of list-field with replicants (the rules are different if list-field is a replicant)