EOTI role to validate information from another table and then show policies to acknowledge

  • 0
  • 2
  • Question
  • Updated 3 years ago
  • Answered

Hello - 

So here is the situation I am dealing with. 

I am a Policy Acknowledgement App which has two tables. One (employee policy form) and other (employees with their names, social security and username). 

Employee table already has all the employee records in it. 

The EOTI homepage has one field which is Username. so now when an employee goes to EOTI homepage and he enters his username, the field should be able to validate that this username is already in employee table and then it should show rest of the form. 

I am pretty sure we can achieve this through javascript but I am failing miserably. 

Photo of AZ

AZ

  • 40 Points

Posted 3 years ago

  • 0
  • 2
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
You seem to be wanting to control access so that each employee only sees the policy form if they are listed as an employee.

I'm not sure if I understand the question but I will try to answer it anyways.

It seems to me that you should be able to have a report on the home page of the app which is filtered by the employee userid is the current user.  You can also set the custom rule permissions for normal employees to only see their own userid employee record.

Then have a link off that record to display the policy form.
Photo of AZ

AZ

  • 40 Points
Yes I want to control the EOTI access for the employees who already have an employee record. If the username doesn't exist, it should either show the message or take them to a page saying your account doesn't exist.

If it exists then it will show them the policy to complete it. I don't think what you provided is the solution.

This is a one time benefit enrollment or waiver policy, employee don't have to see any records. All they have to do is either enroll or waive the coverage but I want to control that EOTI access so only employees with existing username in the database can access this policy table.

P.s. remember I want this for EOTI role.
Photo of AZ

AZ

  • 40 Points
I still didn't hear anything on this.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
When the employee is either enrolling or waiving the coverage, are they editing an existing record in the EOTI table or supposed to add to a new record?
Photo of AZ

AZ

  • 40 Points
They are supposed to add a new record.

when they first go to the form all they can see is one field which is Employee Number:

When they put their employee number in the field and may be do a mouse click, it should verify that employee number and validate that employee number exists in our employee table and if it does exist..then it should show them the benefits form to either enroll or waive the coverage. I can send you some screenshots if you want to see.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
If you are looking for help in writing javascript, that is not what I do.  I only do solutions using native QuickBase.

Are you also implying that these users are all anonymous users?  ie they do not have QuickBase userids?  Or they are all sharing a single userid?
Photo of AZ

AZ

  • 40 Points
Yes. They do not have Quickbase user ids. They will be using EOTI role. I am asking if this can be achieved and you can guide me how we can do this.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
OK, well now I understand the question.  If you want me to answer your questions in the future please try to explain much more completely initially.  It was never stated that all your users were sharing a common userid.  



I would do it like this.

1. Make a data entry field called [EE# input].

2. Make a formula field called  [EE# for Relationship]

3. Based on the EE# for Relationship] field, make a relationship where 1 Employee record has many Employee Policy forms.

4. On the Employee table, make a formula checkbox field called [Employee exists in table?] with a formula of true. 

5. Lookup that field down to the Employee Policy form down to the Employee policy table.


6. On the relationship Make a summary of the  [# of Employee Policy forms], and look that up down to the Employee Policy form table. 

7. On the Dashboard of the app put up a Button to Add New Employee Policy form.  The top section of the form will provide instructions to the user to enter their employee # into the field [EE# input] and save.

8. Make a Form Rules that says:

When multiple conditions are true

when all of the following are true

 - when [# of Employee Policy forms]=0

- when [Employee exists in table?]

Action:

Show Section (the main Employee Policy form).



Then you can also have form rules or formula fields to display messages like,

Sorry, but that is not a valid employee number - that would be triggered when the [Employee exists in table?] is false

or Sorry, but that employee already has submitted an employee policy form.  That would be triggered when the [# Employee Policy forms] > 0


.
Photo of AZ

AZ

  • 40 Points
Hello Mark -

Thank you for the detailed instructions. I have setup everything. Can you give me more detail on Formula Checkbox of making an If and true formula. I appreciate your help!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
The formula for a field to always calculate to being true, (checked) is the word true or else just a 1

There is documentation here for all the formula functions and there is also help available in the formula box itself when actually building a formula  https://www.quickbase.com/db/6ewwzuuj?a=q&qid=1000087

The help and examples for an IF statement are here https://www.quickbase.com/db/6ewwzuuj?a=dr&r=cm&rl=eu
Photo of AZ

AZ

  • 40 Points
Am I putting any other table fields in this formula field to make it always checked? Sorry for being a pain.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
Sorry, I am not understanding your question.  Are you asking how to make the formula checkbox  field on the employee table called [Employee exists in table?]
Photo of AZ

AZ

  • 40 Points
Yes. Thank you. I made the formula field but don't know if I have to put any fields inside that formula.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
I am not understanding the field name or the table of the formula you are talking about.  There are no fields used in the formula n the employees table called [Employee exists in table?]. It is just a checkbox field that will always be true.

The point is that if the Policy Acknowledgement record is created by the user and the lookup of that field {Employee Exists?] is true, then that means that the employee record does in fact exists in the employee table.  if the user keys in employee # 1234567890 and that employee # is not in the employee table, then that lookup field will be blank, which means false.
Photo of AZ

AZ

  • 40 Points
I know it has been a long time but I am completely lost at this. I created the formula field [employee exists in table] in employees table, can you tell what exactly should I put in the formula section of this field?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
To make a formula checkbox field have a formula which always calculates to true, the formula is either:

1


or else


true