Skip to main content
Solved

Search multi-column in PXSelector


Forum|alt.badge.img

Hi expert. Have a nice day.

I custom PXSelector field in below image. I want search on both columns(Description and Asset ID).

I try code:

 [PXSelector(typeof(Search<FixedAsset.assetCD>),typeof(Search<FixedAsset.description>))]

but system build error:

Can you help me this case? Thank you so much.

Best answer by Naveen Boga

@thanhaim  Can you try like below and check 

 

        [PXSelector(typeof(Search<FixedAsset.assetCD>), typeof(FixedAsset.assetCD), typeof(FixedAsset.description), DescriptionField = typeof(FixedAsset.description), Filterable = true)]

 

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

7 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3407 replies
  • April 6, 2023

@thanhaim  Can you please try with below code but I think it will work with search with multiple columns.

 


 [PXSelector(typeof(Search<FixedAsset.assetCD>),typeof(FixedAsset.assetCD), typeof(FixedAsset.description))]


Forum|alt.badge.img
  • Author
  • Freshman II
  • 35 replies
  • April 6, 2023

@Naveen Boga Thank you for your reply. In this morning. I tried your solution

 [PXSelector(typeof(Search<FixedAsset.assetCD>),typeof(FixedAsset.assetCD), typeof(FixedAsset.description))]

But.

we have more anyone ideal? Thank you so much.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3407 replies
  • Answer
  • April 6, 2023

@thanhaim  Can you try like below and check 

 

        [PXSelector(typeof(Search<FixedAsset.assetCD>), typeof(FixedAsset.assetCD), typeof(FixedAsset.description), DescriptionField = typeof(FixedAsset.description), Filterable = true)]

 


Forum|alt.badge.img+9
  • Semi-Pro III
  • 229 replies
  • April 6, 2023

Hi @thanhaim ,

  • Could you please try to set the FilterByAllFields value set to true in Layout Properties section of that particular custom field.

 

or else,

  • You can try to add AutoSearchFields Property to the selector.
AutoSearchFields = typeof(InventoryItem.inventoryCD, InventoryItem.descr))]
  • You can also try to add Filterable= true to the selector.

Hope, It helps!

Regards,

Sweta


Forum|alt.badge.img
  • Author
  • Freshman II
  • 35 replies
  • April 6, 2023

Iā€™m happy and I relly thank @Naveen Boga @sweta68  for your solution. I tried both. its good. 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3407 replies
  • April 6, 2023

Great :) Thanks for sharing the update!! @thanhaim 


Forum|alt.badge.img
  • Author
  • Freshman II
  • 35 replies
  • April 14, 2023

hi @Naveen Boga @sweta68 

Now I want search multi field in this txtbox (as in the picture). I try 3 solution above, but not ok. Can you help me? Thank you so much


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