PartRevSearch BO / GetPartRevListByConfigID method

Anyone know how the second string parameter is properly used for this method? Anything I put in there throws an exception. Just trying to get a list of all approved revs for active parts. Screenshot:

https://i.imgur.com/bvywW0z.png

Thanks!

In the Method Viewer screen click on View -> Extended Properties. In there, there is a dropdown with the list of Datasets available depending on the method being
called. The method you are calling, which I have never used (and must be for Configurators?), is returning a PartRevListDataSet. If you were using GetRows it would return a PartRevSearchDataSet. In those datasets are the valid fields that can be used for
the where clauses. I am not sure if you are using the method in your screenshot for a purpose but GetRows, and the PartRevSearchDataSet, has more columns available but inactive for part is not in either one of those.

Try the Part.GetRows method. It has the PartRev included in its dataset and has where clauses for both the Part and Part Rev.

Scott

Awesome, using the Part Adapter instead works. However, if I use GetRows it’s crazy slow. If I use GetList it’s instant–but my whereclauses dont work. Any thoughts?

Thanks so much for the help!

It is because the GetList method returns the PartListDataSet which does not include the PartRev table. I suspect your trying something like PartNum = ‘XYZ’ AND
Approved = 1, which in the list dataset Approved does not exist.

Look at the Extended Properties, I think that will help you understand why GetList has only 1 where clause and GetRows has a number of them. I did look at GetListByConfigID
in the Part BO and it has a where clause and a PartRev where clause. I did a little test and it appears to work putting in PartNum = ‘XYZ’ for the where clause and Approved = 1 (I double checked on an unapproved rev also) for the PartRev where clause but
it still only returns the data that is included in the PartListDataSet. So if you’re trying to get the data in the PartRev table I think you need to use GetRows. If that is slow try utilizing more of the where clauses in it to limit the amount of data being
returned. Look at the Results and you can see the tables and data in those and how much data is being returned.

Scott

I’m just trying to get a list of parts where Part.InActive = ‘False’ and PartRev.Approved = ‘True’.

The GetRows method is a little slow, but the whereClauses work so I think it’ll have to do. I’ll keep tinkering with it to see if I can limit the data. Thanks for all your help, it is much appreciated. Program is working as intended for now.