I’m gonna say up front I’ve probably broken this somehow…
I’ve got an with 4 tiers of tables. To add a row to the 4th table I need to be able to do it by navigating through the upper 3 tables and clicking new. Or using a standalone form with a dependant dropdown type setup.
The issue I have is that when you navigating through the upper 3 tables and clicking New, it doesn’t populate the Ref column. Which should be the value of the key column in table 3.
Ok, I’ve worked out the initial problem. But all its done is get me back into a problem I though I’d fixed earlier…
So the tables are oragnised as follows (its for reocrding checks on scaffolding on construction sites) 1 = Customer 2 = Site 3 = Scaffold 4 = Check
The issue is the client wants to be able to add a check by either drilling down through each table. Or by using a form in the Check table where they select the Customer, Site and Scaffold before competing the rest of the Check form.
To do this there are the following 3 columns in the Checks Table [Scaffold] = The origional Ref type Column to the Scaffold Table [Scaffold.Name] = An ENUM with a Select function that lets the user pick the scaffold name based on choices made in Check[Customer.Name] and Check[Site.Name]. Only visable if ISBLANK([Scaffold]) since we now then that the user is using the standalone form. [ScaffoldID] = Which uses this to get Scaffold[ScaffoldID] key column IF( ISNOTBLANK([Scaffold]), [Scaffold], ANY(Select(Scaffold[ScaffoldID],[Description]=[_ThisRow].[Scaffold.Name])) )
What stopped the Ref column Check[Scaffold] from populating was that I had previously changed Scaffold[Related Checks] from REF_ROWS(“check”,“Scaffold”)
to Select(Check[CheckID],[ScaffoldID]=[_ThisRow].[ScaffoldID])
This is becase Check[Scaffold] is blank if the user used the standalone form. Whereas [ScaffoldID] always contains the Key column from the Parent Table, Scaffold.
Am I doing this bit wrong in someway? Do I need to merge the Ref_Rows and the Select funtion in some way?
I think I understand what your proposing. But to get to that point they’d have to either navigate through the customer and site records. Or I’d have to provide a list of all scaffolds grouped by site. Which wouldn’t be efficent either as they could have over 100 scaffolds and would have to scroll up and down to find the right one.
I suspose it would be helpful if someone could just tell me if what I’m trying to do is impossible. I.e. allowing the user to add rows both by using both a standalone form and via natigating through the DeRef columns. I know either works independantly.
@MultiTech_Visions do you know if this is possible?
Doesn’t each scaffold have only one parent (Site) and one grandparent (Customer) and couldn’t you display that in the Scaffold detail view? I don’t understand why you would have to navigate anywhere or group scaffolds by site.