Skip to main content
Answer

Include Several Lists in a combo box

  • April 8, 2023
  • 1 reply
  • 155 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 });
}

 

1 reply

Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • 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 });
}