Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
Rkeeley

Member
Registered:
Posts: 49
Reply with quote  #1 
I am looking for some information and guidance with a list field. Here is my situation.  I have a list field that I populate information from a table.  The user is able to select as many items from the list field.  Once the user has made their selection, the user will push a button and there is script on the button to update a grid.  I want each item selected in the list field to have it's own entry in the grid.

Does the list field act as an array or do I have to separate the information where the comma is?  I have not really found much information on the list field and any help would be greatly appreciated!!
0
bigfootger

Veteran
Registered:
Posts: 139
Reply with quote  #2 
With client side javascript you are able to for-loop through your listbox, so you can build an array with all selected items. you can pass that information into a server side function to do your table updates.

Best regards

__________________
Metastorm BPM Remote Expert Help & Web Consultations - http://connect.convedo.com/free-1-hour-web-consultation
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #3 
We tend to do it in one hit. If it is an integer, like an ID, then it is easy:

Quote:
INSERT INTO targatetable (FolderId,ID) SELECT '%Folderid', id FROM SourceTable WHERE id in (%mListField)


If it is text, like a username, then you have to add the quotes.
Quote:
INSERT INTO targatetable (FolderId,ID) SELECT '%Folderid', id FROM SourceTable WHERE id in ('%Replace(%mListField,%Chr(44),'%Chr(44)')')


%Chr(44) is a comma, and is only used for clarity of the code.

Both assume the list is the default of a comma delimited list. You may need to explicitly set this in later versions as they helpfully use the default delimiter of the function you are using to get data (eg %Newline() for %SelectSQL())

Having said that, you can replace any delimter by putting it where the first %Chr(44) is.

__________________
Post an example, and we will have a much better idea what the problem is. In about 90% of posts, the problem is one of communication. Examples bridge that gap.
0
Rkeeley

Member
Registered:
Posts: 49
Reply with quote  #4 
bigfootger,

Do you have any sample code you could share with me on creating the array and then writing that information to a grid?  I have never had to write an array and that way sounds like it will work best for what we are trying to accomplish.  I have found plenty of documentation on how to write an array, but nothing with using a variable.
Any help would be greatly appreciated!!
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!