Skip to main content
Answer

Turn a Selector into a Combo Box

  • February 10, 2025
  • 3 replies
  • 76 views

Forum|alt.badge.img

I’m trying to turn OrderType from a selector of every order type to just certain order types for our customer portal. I’ve been trying to change it to ComboBox since those options can be changed, but every time I save the Screen Editor, it goes back to Selector. What would be the best way to go about this?

OrderType

 

Best answer by MichaelShirk

Hi, ​@kkraus !

I don’t think changing the control type of the field will be what’s needed in this case. 
The order type field uses the PXSelector control which is used to select a key value from a record saved in the database, whereas the dropdown list is typically used for a list of values predefined in code.

You probably need to look at using the PXRestrictor attribute similar to what’s mentioned in this article.

Conditional PXRestrictor on Look up | Community
 

The PXRestrictor allows you to restrict the values available for selection in the selector control based on the conditions you specify.

In technical terms, it adds a “WHERE” condition to the SQL query that is generated to select the available values for the Selector control.

Does this make sense?

Regards,

-Michael Shirk

3 replies

MichaelShirk
Captain II
Forum|alt.badge.img+5
  • Captain II
  • Answer
  • February 10, 2025

Hi, ​@kkraus !

I don’t think changing the control type of the field will be what’s needed in this case. 
The order type field uses the PXSelector control which is used to select a key value from a record saved in the database, whereas the dropdown list is typically used for a list of values predefined in code.

You probably need to look at using the PXRestrictor attribute similar to what’s mentioned in this article.

Conditional PXRestrictor on Look up | Community
 

The PXRestrictor allows you to restrict the values available for selection in the selector control based on the conditions you specify.

In technical terms, it adds a “WHERE” condition to the SQL query that is generated to select the available values for the Selector control.

Does this make sense?

Regards,

-Michael Shirk


Forum|alt.badge.img
  • Author
  • Freshman II
  • February 11, 2025

That train of logic worked. Thank you.


MichaelShirk
Captain II
Forum|alt.badge.img+5
  • Captain II
  • February 11, 2025

Glad to help!