ComboBox hidden values

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
This topic is 11 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
boyddt_co
Posts: 89
Last visit: Mon Sep 25, 2023 9:36 pm

ComboBox hidden values

Post by boyddt_co »

I have a list that contains a user friendly site name and a corresponding OU for active directory, such as "Monument, OU=monument,DC=company,DC=local". I want to only display "Monument" in the combobox but pass the OU info through. Can that be done?David
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

ComboBox hidden values

Post by davidc »

I'm no familiar with AD objects, but if it is an object with properties you can use the DisplayMember to select the property to display in the combobox. See the Spotlight on the ComboBox control article for more information. If it is a string, then you will need to manually parse out the information. David
David
SAPIEN Technologies, Inc.
User avatar
boyddt_co
Posts: 89
Last visit: Mon Sep 25, 2023 9:36 pm

ComboBox hidden values

Post by boyddt_co »

Leaving AD out of the equation for now, if I have the text string "Monument,
OU=monument,DC=company,DC=local", can I display the first part and then pass the second part to the script? I've checked out the spotlight article but it wasn't very clear. Is DisplayMember a property of the control or can I only access it programatically?
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

ComboBox hidden values

Post by davidc »

DisplayMember is a property of the ComboBox. You can see how it is set by looking at the definition of the Load-ComboBox helper function. David
David
SAPIEN Technologies, Inc.
This topic is 11 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.