Can i create a Pick list from a query?

Posted by Rollbase User on 11-Jul-2011 20:59

I looked at the CRM app and noticed that a few of the objects had the same pick list values for province/state and country. I was wondering if there is a way to have the pick list values populate using a query to my database table rather than from the pick list values - or am I missing something here? I'd like to give my users the ability to create record types (eg. Party types for a party table) and have the ability to update the available types on their own, rather than me have to update the pick list. Thanks Earl

All Replies

Posted by Admin on 11-Jul-2011 22:40

You can create object type, say, for states, than create relationships with that object and use lookup fields instead of picklists.

Posted by Admin on 12-Jul-2011 10:12

Yes, as Pavel mentioned I would recommend creating a separate object in this case, and relating that object to the objects for which you want to have fields allowing selection of those records.



When you create the relationship, a lookup field will automatically be created for you. You can then configure the lookup field to display as a Picklist in your New and Edit pages. Also your users will see a "+" icon next to it allowing them to add items as needed.

Posted by Admin on 03-Jan-2012 22:04

Hi, I created an object and added a hierarchal field on it to have a parent and child relationship. It works, the problem I have now is that I also want to use the same records in that object as picklist values on two new picklist fields. is that possible?



What i mean is to create a picklist field to be populated using the records on the object the picklist belongs to?

Posted by Admin on 04-Jan-2012 18:03

Yes, by creating the relationship the system creates Lookup fields for you. When in the page editor you can select any lookup field and choose to display it as a Picklist rather than a lookup



Hope this helps,

Matt

Posted by Admin on 04-Jan-2012 20:43

Thanks, actually I've been doing that, it's just that I need that picklist with the same content thrice on the same page.



Since I can only use the related object as picklist or lookup on the page once, I'm thinking of just doing a javascript for now to popup the records then just copy the contents to a text field.



regards

Posted by Admin on 11-Jan-2012 14:11

Wilbert you can create additional relationships to the same object, so in your example, you could create the relationships to the a State object, you need their Home State, Work State, and Income State. If you have the object as suggested called States which has all of your options. On the object that needs the picklists, you you create 3 relationships and name them appropriately. You now have the 3 picklists (by changing their display type on New and Edit pages) for Home State, Work State, and Income State with no scripting and the ability for you to update as needed.

This thread is closed