Skip to main content
Solved

Include Several Lists in a combo box

  • 8 April 2023
  • 1 reply
  • 137 views

Michael Ndungi
Varsity I
Forum|alt.badge.img

Hello Everyone,
How can I include several list of items in one combo box such that(from the example below):
If the user clicks “AFE for capital expenditure”  the list of item in Nature of requisition that correspond to that purchase type are available.
If the user clicks the next item “ AFEs for the lease of assets” different items corresponding to the purchase type appear in the nature of requisition and so on.
 

Kindly assist,
All responses will be highly appreciated.
Thank you all

Best answer by Dmitrii Naumov

PXStringList attribute has a SetList method that you can use to change the list. You can put it in the RowSelected event

if (docType == APDocType.Refund || docType == APDocType.VoidRefund)
{
	PXStringListAttribute.SetList<APAdjust.adjdDocType>(cache, null, new string[] { APDocType.DebitAdj, APDocType.Prepayment }, new string[] { Messages.DebitAdj, Messages.Prepayment });
}
else if (docType == APDocType.Prepayment || docType == APDocType.DebitAdj)
{
	PXStringListAttribute.SetList<APAdjust.adjdDocType>(cache, null, new string[] { APDocType.Invoice, APDocType.CreditAdj }, new string[] { Messages.Invoice, Messages.CreditAdj });
}

 

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

1 reply

Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+6
  • Acumatica Moderator
  • 595 replies
  • Answer
  • April 8, 2023

PXStringList attribute has a SetList method that you can use to change the list. You can put it in the RowSelected event

if (docType == APDocType.Refund || docType == APDocType.VoidRefund)
{
	PXStringListAttribute.SetList<APAdjust.adjdDocType>(cache, null, new string[] { APDocType.DebitAdj, APDocType.Prepayment }, new string[] { Messages.DebitAdj, Messages.Prepayment });
}
else if (docType == APDocType.Prepayment || docType == APDocType.DebitAdj)
{
	PXStringListAttribute.SetList<APAdjust.adjdDocType>(cache, null, new string[] { APDocType.Invoice, APDocType.CreditAdj }, new string[] { Messages.Invoice, Messages.CreditAdj });
}

 


Reply


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