hi there, I'm in a situation whereby I capture the data in DCT using and allow user to check multiple item, so the DCR will store the data in this form:item_1_id, item2_id....but when back to the Presentation Template (*.tpl) I want to run a database query on each and every item to retrieve the item_name and populate the result in presentation. which i think it will be implemented in and , , ...so if the data stored in item_1_id, item_2_id... how can I split the item and write my presentation template code?please feel free to ask more information, as I not sure whether what i posted there is enough for troubleshoot or not.
hi there, I'm in a situation whereby I capture the data in DCT using <checkbox> and allow user to check multiple item, so the DCR will store the data in this form:<mycheck>item_1_id, item2_id....</mycheck>but when back to the Presentation Template (*.tpl) I want to run a database query on each and every item to retrieve the item_name and populate the result in presentation. which i think it will be implemented in <iw_iterate> and <iw_sql_open>, <iw_sql_query>, <iw_sql_iterate>...so if the data stored in item_1_id, item_2_id... how can I split the item and write my presentation template code?please feel free to ask more information, as I not sure whether what i posted there is enough for troubleshoot or not.
It can be split using an underscore, however if the name itself has any underscore iwthin then it would be a problem again.1. Either use any other special char to concatenate your item name, number and id or,2. Use the rindex function to get the value before the second underscore.I hope it helps.
You could probably do this with iw_iterate, but I think it would be much easier to break into an <iw_perl>...</iw_perl> section, retrieve the value of the node and then use Perl's built-in split function to get the data in the format you want.After that you can either continue doing the processing in Perl, or go back to using the iterate stuff - referencing an array that you created within the Perl block.I suggest spending some time reading both the TeamSite FormsPublisher Developer's Guide and the various documents available on your TS server via the URL your-ts-server>http://your-ts-server/iw/help/tst/pt
Thanks! the problem solved