Jump to content
  • 0

Restrict Access Based on Multiple Fields


walkerc

Question

Hi, apologies but not sure my title explains exactly what I'm trying to achieve! I've got 2 tables - Main_Data and Contractor_Data, I've then created a details data page where I have included 3 drop down fields. The user can then select a Contractor (TradingName) using  the drop downs from the Contractor_Data table which then become Contractor_1 in the Main_Data table, the same then for Contractor_2 and Contractor_3 - this all works fine.

So I have created a view so each contractor can log in to see their respective  jobs, I have linked the tables using Contractor_Data.TradingName = Main_Data.Contractor_1, this also works fine - Contractor_1 logs in and can see all the jobs under Main_Data.Contractor_1.

Now the problem I'm having and hope that you might be able to help with, the jobs where we allocate more than 1 contractor (total of 3 on any one job) those contractors are unable to see their jobs as the view is only linking Contractor_1 so I added to the view - Contractor_Data.TradingName = Main_Data.Contractor_2 and Contractor_Data.TradingName = Main_Data.Contractor_3 and in the criteria tab set them as OR thinking that whatever position the contractors TradingName appears he should be able to view those jobs.

The result I get is 'No Results' unless I enter the same TradingName in all three fields.

What I want to achieve is that a contractor can log in using TradingName in auth field and then see all jobs allocated to them irrespective of whether they are either Contractor_1, 2 or 3

Hoping I've made sense?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Hi @walkerc,

You will not be able to build a View with desired output because Joins cannot be configured with OR logic.  

I can suggested using a filtering criteria on Datapage in order to show the records from Main_Data table to the Contractor.

You should use a Main_Data as a data source for your Datapage. Also you should enable authentication which based on "Contractor_Data" table for this Datapage.

Finally you can use the following filtering logic:

P.S. use TradingName i.o. Record_ID from my sample.

tZBYRRd.png

 Hope this helps.

Let me know if you have any questions.

Regards,

vitalikssssss

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...