javascript for and query

javascript for and query

  
How to do that in an expression:
"<script>
for (i=0;i<5;i++){

 var newcontent="";
   newcontent +='<div> "+GetProjectsByProjectCategory.List[i].DOCUMENT.Id+" </div>

}

</script>"

where i is the index javascript???
Hi Luis,

I'm not sure you can.

I'd do the for loop in Service Studio, and using an assign node make newcontent be

newcontent + '<div> "+GetProjectsByProjectCategory.List.current.DOCUMENT.Id+" </div>';

and append all the strings there, and then dump it in an unescaped expression.

I hope this makes sense. Let us know how it goes.

Regards,

Paulo Tavares
Hi Paulo my for has to be in javascript

Now i have a input field with name ="wtindex" and i decided to pout on code:

document.getElementById('wtindex').value=i;"+
page_index=TextToInteger(GetFormValue("wtindex"))

page_index is a local variable and then  i use this variable on 

GetProjectsByProjectCategory.List[page_index].DOCUMENT.Id

but it seems that service studio interprets this code 

page_index=TextToInteger(GetFormValue("wtindex")) 

like a condition that returns false and not  a assignment 
Well, that makes sense, 'cause that's not the assign syntax for the platform :)

I'm out of ideas for now - hopefully someone else has a different view and can provide a solution.

What exactly are you trying to accomplish? Maybe that can be done some other way.

Regards,

Paulo Tavares