Using variables for list control / field
Hi All
I'd like to use the contents a form variable to be the list options in a list control / field. On the list control under List Options I select from a business object, then select Local and then the variable name. However when the form is rendered the list options in the list control does not show as a list but as a single line of items instead. I have tried making the items in the form variable a list and a comma seperated list.
Thanks
Jas
Comments
-
You can use a variable as you describe but you need to return a list object to the list options of a dropdown. Assuming that you have a memo variable with a comma seperated list of values you can use the following in the list options:
new List(ProcessNameData1.mDataSelection.ToString().Split(','))
ProcessNameData1 is your process data where ProcessName is the name of your Process. mDataSelection is the Memo variable used to store the dynamic results for your Dropdown.
Hope this helps.
0 -
Thanks Paul
I did try something similar but got errors. On the List control List options I selected from an expression and used
ListItems(Local.AvailUsrNameLst) which did not work and then tried List(Local.AvailUsrNameLst.Split(',')) but the expression builder was'nt happy with it. In 7.6 the delimeter for lists was a tab so may try that.
Thanks
Jas
0 -
There is also a library located in the Sample Processes folder under your install directory that will make dealing with lists a breeze.
Deploy the Library located in this path of your install
C:\Program Files (x86)\Metastorm\BPM\Sample Processes\ListConversionLibrary
It has a few methods that you can use to convert data into List format. Particularly useful for strings because it allows to you to choose the variable and pass the delimiter of your choice to it.
Affter the library is installed add it to your procedure and you will be able to use something like
Metastorm.Runtime.Models.ListConversionFunctions.ListConverter.CreateListFromText(Local.memlistData,
",")
in your ListOptions
I've included a demo so you can see it used on list and radioboxes
Hope that it helps.
0 -
Thanks, I was having the same issues as the original poster - the library worked well - however I needed to convert the memo into text before it worked correctly.
Metastorm.Runtime.Models.ListConversionFunctions.ListConverter.CreateListFromText(Local.memlistData.ToString(),
",")
Also (and this was a nice part of the function), I would recommend changing delimiters to something like a pipe (ex. |) ...
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 152 General Questions
- 148 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
- 32 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories