Solved

Grid is only populating one row instead of many and the one row is the Current row in the PXFilter View.

  • 17 November 2023
  • 4 replies
  • 76 views

Userlevel 1
Badge

FYI, self taught, have a lot of python backgfround and now trying to learn C# with Acumatica.

 

So I have a a PXFilter View and I have populated it with some data from the T100 Acumatica local installation. When I debug I can the information is in it but one row of data is under the Current folder and the rest of the rows are in the Inserted folder. Here is a screenshot.

 

For some reason when I pass it to the FormGrid on the UI only the row from the Current folder shows. See here.

 

 

Here is a screenshot of the Customization showing I have the CombinedView set as the datamember for the grid.

 

 

Does anyone know what I am doing wrong and why the rest of the rows are not populating?

 

--UPDATE--

I just found a different spot in the View that has the same Current folder with same data. I am not sure what this is used for as it is outside of the cache.

 

icon

Best answer by Dmitrii Naumov 17 November 2023, 19:39

View original

4 replies

Userlevel 7
Badge +5

@manley75 your ‘CombinedView’ should be of type PXSelect and not PXFilter

Userlevel 1
Badge

@manley75 your ‘CombinedView’ should be of type PXSelect and not PXFilter

Hey @Dmitrii Naumov I tried switching the PXFilter out for a PXSelect but this did not help. It did introduce an additional error on the UI. See screenshot below.

 

 

Why do you suggest I use the PXSelect instead of a PXFilter? When I have used the PXSelect to get the data directly from a database table it works then of course. But I am doing two different Selects and then combining them with the “GetCombinedData()” function.

Userlevel 7
Badge +5

@manley75

You should also change the way you populate the data for your grid.

Doing it in FieldUpdated is not the proper way.

Take a look at this article:

https://help.acumatica.com/(W(22))/Help?ScreenId=ShowWiki&pageid=acecfa2b-90d5-475c-8cf2-b2c5f8e60672

 

Normally, PXSelect invokes SQL select to the DB, and since you don’t have such table in the DB, you see the SQL error here. You can replace it with custom code, as described in the article above. You’ll avoid the SQL error then.

 

As for the PXFilter, it does not invoke SQL select. Instead, it just inserts one record in the current and displays it. That’s why you only see one record.

Userlevel 1
Badge

@Dmitrii Naumov Ah I see. I misunderstood what the PXFilter was doing. Thanks for the documentation link and for pointing me in the right direction. I’ve got it up and working now.

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved