PDA

View Full Version : variable file hiding - vdfquery 1.7



Jim Mulenos
12-Oct-2007, 06:50 AM
Hi Sture

We are using Vdf 7.3 and I would like to allow some of the other users in
our department to utilize your VdfQuery 1.7.

My challenge is that I need to hide certain files from some users while
allowing access to others. How can I hide or expose files in the VdfQuery
file listing based upon the user accessing the utility?

Your utility is wonderful. Many thanks.
--

Jim

Jim Mulenos

m3 Corporation
West Coast Networks

Asset Research Services, Inc.
www.AssetResearch.com

Incredible People Magazine
www.IncrediblePeople.com

"Art is a lie that helps us see the truth"
- Pablo Picasso

Sture Andersen
12-Oct-2007, 07:04 AM
Hi Jim,

Somewhere in your application use the VdfQuery_ExcludeFile message to
control the table access:

// User cannot select customer as main file for a query:
set VdfQuery_ExcludeFile customer.file_number to VDFQ_TRUE

// User cannot see customer table even when another table is main file
// and Customer is just related:
set VdfQuery_ExcludeFile customer.file_number to VDFQ_ALWAYS

// User can select Customer table as normal (default):
set VdfQuery_ExcludeFile customer.file_number to VDFQ_FALSE

HTH

-Sture

Jim Mulenos
12-Oct-2007, 07:20 AM
Sture

Thanks for your response. I saw this command in your doc but did not know
if it was possible to run these in a variable fashion at runtime. I am
assuming that you are suggesting I:

1. keep a table of those files I want hidden from each user stored
somewhere and indexed by user,

2. just before calling VdfQuery, look at that table by user,

3. run the "Set VdfQuery..." commands using whatever files I want excluded
for that user,

4. then run VdfQuery.

Do I have that right? Many thanks.

Jim

Jim Mulenos

m3 Corporation
West Coast Networks

Asset Research Services, Inc.
www.AssetResearch.com

Incredible People Magazine
www.IncrediblePeople.com

"Art is a lie that helps us see the truth"
- Pablo Picasso

"Sture Andersen" <sture.aps@mail.tele.dk> wrote in message
news:wLxgHgMDIHA.4116@dacmail.dataaccess.com...
> Hi Jim,
>
> Somewhere in your application use the VdfQuery_ExcludeFile message to
> control the table access:
>
> // User cannot select customer as main file for a query:
> set VdfQuery_ExcludeFile customer.file_number to VDFQ_TRUE
>
> // User cannot see customer table even when another table is main file
> // and Customer is just related:
> set VdfQuery_ExcludeFile customer.file_number to VDFQ_ALWAYS
>
> // User can select Customer table as normal (default):
> set VdfQuery_ExcludeFile customer.file_number to VDFQ_FALSE
>
> HTH
>
> -Sture
>
>

Sture Andersen
12-Oct-2007, 07:40 AM
We are talking about an application that includes vdfquery.utl. In the
application source, at anytime (I'd probably do it at start-up), execute the
statements and they will be good until the application teminates. I wouldn't
way until "just before" calling VDFQuery since that may (or may not) be hard
to identify.

> 1. keep a table of those files I want hidden from each user stored
> somewhere and indexed by user,

Yes, or base it on user category or something in the Windows environment.
Whatever.

-Sture