PSI: filtering ReadResources() by RES_PREVENT_ADSYNC column

T

Termin_Terminator

X-No-Archive: Yes

Hello

I want to read resources from Resource.asmx WebService through
ReadResources() method.
A filter object shall filter by the column "RES_PREVENT_ADSYNC" which
is type of boolean.

The ReadResources() method returns a ResourceDataSet where I have all
resources in the Resources datatable, but the column
"RES_PREVENT_ADSYNC" isn't there, it's member of the
ResourceAuthorizationDataSet.Resource datatable.

How can I filter for the "RES_PREVENT_ADSYNC" column of another
Resource datatable?

It's not crazy to ask because when I assign ResourceDataSet.Resource
datatable to a DataGridView then due to certain constraints the
columns of ResourceAuthorizationDataSet.Resource datatable have been
added to the view; there I have access to that column. But how do I
filter for that column? Thanks for any help.

Kind regards
Termin_Terminator
 
S

Stephen Sanderlin

There's really no good way. You certainly don't want to call
ReadResourceAuthorization for every returned resource, and since
RES_PREVENT_ADSYNC isn't in ResourceDataSet.ResourceDataTable, you have
only a two options that I can think of off the top of my head:

1) You can create a custom PSI extension that would have appropriate
methods (e.g. ReadAllAdSyncResources()) to query the RDB and return a
dataset containing the name and guid of resources that can adsync;

2) Query the RDB yourself in your application to get this information
first, then build a filter for the ReadResources() method from the
results;

--
Stephen Sanderlin
Owner/Founder - EPMFAQ
http://www.epmfaq.com/
http://forums.epmfaq.com/

EPM Solutions Architect / Principal Consultant - BT Professional
Services
http://bt.ins.com/

This electronic message, along with any information, advice, and
opinions it contains, are mine alone and are not representative of my
employer. All information is provided in "GOOD FAITH" and on an "AS IS"
basis only. I provide no presentations or warranties, express or
implied, including implied warranties of fitness for a particular
purpose, merchantability, title, and noninfringement. I strongly advise
you to extensively test any changes, workarounds, or techniques
described herein on a development system prior to implementation in a
production environment, and you are hereby notified that I bear no
responsibility whatsoever for any loss, harm, or otherwise negative
outcomes resulting from your actions, whether or not said actions were
a result of this electronic message, directly or indirectly.
 
T

Termin_Terminator

Thank you for your answer, I did step 2) in vice versa, that means I
first built a filter for ReadReasources() method to get as least
information as I could.
After that I do a ReadResource() call for every resource and there I
check for the column "RES_PREVENT_ADSYNC". However, it worked :)

Kind regards,
Termin_Terminator
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top