Skip to main content
Solved

How add a dropdown list in 2023R2


Forum|alt.badge.img

Hi All,

Could please share us the steps to add a dropdown list for a screen.

Thank you

Best answer by Nilkanth Dipak

Hi @nawanjanahansamali50 ,

You need to create a custom field with string datatype. then in DAC declaration add a

 [PXDBString(10, IsUnicode = true)]
        [PXUIField(DisplayName = "Test")]
        [PXStringList(
            new string[] { "Value1", "Value2", "Value3" },
            new string[] { "Description 1", "Description 2", "Description 3" }
        )]
        public virtual string TestField { get; set; }

attribute to add dropdown values. It will changes your string field to dropdown automatically

View original
Did this topic help you find an answer to your question?

3 replies

Laura02
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3132 replies
  • June 11, 2024

Hello,

Can you please show a screen shot of what you need, an example?  To help us answer.

Thank you.

 

Laura


Nilkanth Dipak
Semi-Pro II
Forum|alt.badge.img+10
  • Semi-Pro II
  • 436 replies
  • Answer
  • June 11, 2024

Hi @nawanjanahansamali50 ,

You need to create a custom field with string datatype. then in DAC declaration add a

 [PXDBString(10, IsUnicode = true)]
        [PXUIField(DisplayName = "Test")]
        [PXStringList(
            new string[] { "Value1", "Value2", "Value3" },
            new string[] { "Description 1", "Description 2", "Description 3" }
        )]
        public virtual string TestField { get; set; }

attribute to add dropdown values. It will changes your string field to dropdown automatically


Forum|alt.badge.img+1

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings