Hi I am trying to get bunch of IDs from my select statement. And I want to loop through the each id selected and create an Array of those IDs so that I can export that array to my vignette template.
I am planning to use
Select ID from Search where Name\title likep $strKeyword
It returns me ID as 1,2,3,4,5
Want to loop through it as
<loop $ID>
I want to create an Array with variable name as $IdArray. Can u give me an example on creating array in this way?
</loop>
select $$$$rank rankval, RankValArray, ID, IDArray, PARENT_ID, PIDArray, PARENTY_TYPE_ID, PTArray
from cmp_Search
where NAME\TITLE likep $$strKeywordComplete
So I can create array of Rank too in same way right?
I will have to do:
<loop $IDarray>
Array[$loop]=$IDarray<br>
</loop>
<loop $PIDarray>
Array[$loop]=$PIDarray<br>
</loop>
<loop $PTIDarray>
Array[$loop]=$PTIDarray<br>
</loop>
<loop $RankValArray>
Array[$loop]=$RankValArray<br>
</loop>
Right? I can export IDArray, PIDArray, PTIDArray, RankValArray using EXPORT Tag?
You kind of missed the point of my example above. The <loop> was only to print the values out and had nothing to do with assignment. EXPORT will export multiple valued variables. the following program will illustrate this. Please run it, it will help you understand both EXPORT and the array nature of Vortex vars.