Using Business Object on For Each loop
Hey All
I'm trying to build some code to run a for each loop from a form's command button.
I add the For Each activity in the visual script editor and then in the List / Business Object collection I select the Local Business Object but then i'm not allowed to select the form variable from Local BO. I cant seem to type type anything in either. Has anyone else tried this?
Thanks
Jas
Comments
-
It does not make sense to use the Local Business Object in a foreach loop. I am pretty certain it does not support the required interation interface. I imagine it is in the selection list in error.
What is it you are trying to do?
0 -
Hi,
Yes we have done this before, however we use a Code activity not the "Assign value(s)" visual script with-in the loop to do this.
This then allows you to do something like...
if (Local.memComments == null || Local.memComments == "") Local.memComments = ForEachActivity1.comments; else Local.memComments += "\r\n" + ForEachActivity1.comments;
Within the iteration of the loop, where "ForEachActivity1" is the name you give to the For each loop visual script.
Cheers,
Bill
0 -
As I understand it, that is for using a List in the foreach activity. If you use a Business Object, you should reference that, I think.
In any case, the Local 'Business Object' is not iterative in either event.
Bill Tanner wrote:
Hi,
Yes we have done this before, however we use a Code activity not the "Assign value(s)" visual script with-in the loop to do this.
This then allows you to do something like...
if (Local.memComments == null || Local.memComments == "") Local.memComments = ForEachActivity1.comments; else Local.memComments += "\r\n" + ForEachActivity1.comments;
Within the iteration of the loop, where "ForEachActivity1" is the name you give to the For each loop visual script.
Cheers,
Bill
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 154 General Questions
- 149 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 33 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories