I have a table for "Drivers" It contains Driv...

(Jim Davidson) #1

I have a table for “Drivers” It contains DriverID and is a key Only an admin can add drivers to this table.

A second table is for “Van Checks” it also has a DriverID Column (not set as a key - but could be if I need to!)

I want to allow drivers to enter the driver id in the van check part of the app but not allow them to proceed if they are not found in the Drivers table.

How would I do this please? And perhaps display a warning if they are not valid!

(Aleksi Alkio) #2

Formula like AND(TRUE,IN([_THIS],Drivers[DriverID])) into the Valid_If should be okay.

(Jim Davidson) #3

@Aleksi_Alkio You sir are a legend - it works perfectly well thank you. Onwards and upwards.

(Jim Davidson) #4

Using that expression I can check if the DriverID is in the driver table, if not, it is highlighted and if save it will show “Not Valid” My next field in the app is Employee. I have used valid if to see if the employee number is that same as the DriverID [Employee]=[DriverID] basically a double check of the original value.

My next field will be UserName. Is there a way to populate this field automatically from the Drivers table? Thank you.

(Aleksi Alkio) #5

LOOKUP(USEREMAIL(),Drivers,Email,Username) if those column names are correct.

(Jim Davidson) #6

@Aleksi_Alkio Can’t get that to work even with changing things. I would like the Username to populate based on the answer to either Employee or DriverID Is that possible? Thank you

(Aleksi Alkio) #7

LOOKUP([_THISROW].[DriverID],Drivers,DriverID,Username)

(Jim Davidson) #8

@Aleksi_Alkio Thank you again. Trust me I am looking for my own answers! You are very helpful and I am learning a lot. Thanks again

(Aleksi Alkio) #9

Not a problem :slight_smile: