Skip to main content
Answer

Can we use PXOrderedSelect multiple time for a view for single table

  • January 30, 2024
  • 3 replies
  • 132 views

Hi,

I want to use PXOrderedSelect for multiple view but the view which I have created are of single table.

So, is there any way that I can use PXOrderedSelect  for multiple view for a single table .

Here primary is different but table is same for all view.

Also, can you tell me if PXOrderedSelect  can be use instead of PXSelectJoin and if not than what I can use in place of PXSelectJoin so that I can perform drag and drop functionality of PXOrderedSelect .

I am using PXOrderedSelect for drag and drop and using it in place of PXSelect.

 

Thanks,

Dhruv

Best answer by jharris

Hi @Dhruv,

Adding to the conversation, it's important to note that PXOrderedSelect is indeed typically used in scenarios where ordering is crucial, especially when dealing with joined tables. However, it can also be used with a single table if ordering and drag-and-drop functionality are required within the user interface.

If your intention is to have multiple views with drag-and-drop capabilities on a single table, and if each view has a different primary DAC, you could define multiple PXOrderedSelect instances, each with its own primary DAC, as previously mentioned. However, if the other developer's input suggests that PXOrderedSelect is more suited to multi-DAC scenarios, it's worth considering whether the complexity added by using PXOrderedSelect in a single-table scenario is necessary, or if simpler alternatives could meet your requirements.

For a single DAC without the need for joining multiple tables, PXSelect with the OrderBy directive might suffice for your needs. This would allow you to order the results while keeping the implementation simpler. However, this wouldn't provide drag-and-drop functionality out-of-the-box, which seems to be a requirement for you.

Here's an example of how you might define a PXSelect with ordering:

 
PXSelect<YourDAC, Where<YourDAC.field, Equal<Required<YourDAC.field>>>, OrderBy<Asc<YourDAC.orderField>>> YourView;

 

To maintain the drag-and-drop functionality you're seeking, you might need to consider extending the UI with custom scripts or leveraging Acumatica's client-side framework to introduce interactive elements.

Ultimately, the choice between PXOrderedSelect and PXSelect depends on the specific requirements of your views and whether drag-and-drop functionality is a must-have. If it is, you might need to stick with PXOrderedSelect or explore custom UI extensions.

I hope this clarifies your options further. If there's anything more specific you'd like to explore, please let us know.

Best regards,

3 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • February 2, 2024

@Dhruv  As per my knowledge NO.

For a single DAC, we generally use PXSelect. If you need to order the results, you can utilize the OrderBy property within PXSelect. PXOrderedSelect is more commonly used for multi-DAC scenarios where you are joining data from different tables and orders the results.

PXOrderedSelect includes the below parameters to define a VIEW

  1. Primary
  2. Table
  3. Where
  4. OrderBY

 

 


jharris
Semi-Pro I
Forum|alt.badge.img+7
  • Semi-Pro I
  • Answer
  • February 2, 2024

Hi @Dhruv,

Adding to the conversation, it's important to note that PXOrderedSelect is indeed typically used in scenarios where ordering is crucial, especially when dealing with joined tables. However, it can also be used with a single table if ordering and drag-and-drop functionality are required within the user interface.

If your intention is to have multiple views with drag-and-drop capabilities on a single table, and if each view has a different primary DAC, you could define multiple PXOrderedSelect instances, each with its own primary DAC, as previously mentioned. However, if the other developer's input suggests that PXOrderedSelect is more suited to multi-DAC scenarios, it's worth considering whether the complexity added by using PXOrderedSelect in a single-table scenario is necessary, or if simpler alternatives could meet your requirements.

For a single DAC without the need for joining multiple tables, PXSelect with the OrderBy directive might suffice for your needs. This would allow you to order the results while keeping the implementation simpler. However, this wouldn't provide drag-and-drop functionality out-of-the-box, which seems to be a requirement for you.

Here's an example of how you might define a PXSelect with ordering:

 
PXSelect<YourDAC, Where<YourDAC.field, Equal<Required<YourDAC.field>>>, OrderBy<Asc<YourDAC.orderField>>> YourView;

 

To maintain the drag-and-drop functionality you're seeking, you might need to consider extending the UI with custom scripts or leveraging Acumatica's client-side framework to introduce interactive elements.

Ultimately, the choice between PXOrderedSelect and PXSelect depends on the specific requirements of your views and whether drag-and-drop functionality is a must-have. If it is, you might need to stick with PXOrderedSelect or explore custom UI extensions.

I hope this clarifies your options further. If there's anything more specific you'd like to explore, please let us know.

Best regards,


  • Author
  • Freshman I
  • February 16, 2024

Hi,

I have one more question. I have multiple tabs in my screen, also all the tabs have different table. ( multi-DAC Scenario) and when I have use PXOrderedSelect  on the multiple tabs so that I can perform drag and drop on tabs., but still it works for single tab only.

As you mentioned in above solution that PXOrderedSelect  can be use for multi-DAC scenario, but in my case it is not working.

Any suggestion or solution for PXOrderedSelect  to be worked for multiple tabs.

Thanks,

Dhruv