How to Create Multi-Level Dependent Column Validation?

Hi everyone,
I’m trying to set up a table where columns must be filled out in a specific order, with each column’s validation dependent on the previous one being completed.
My Table Structure:
Date (Column Type: Date)
Client (Column Type: Relation)
Title (Column Type: Text)
Description (Column Type: Text)
Employee (Column Type: Relation)
Desired Validation Logic:
The Date must be entered before the Client column becomes available/valid.
The Client must be selected before the Title column becomes available/valid.
This pattern should continue for Description and Employee.
What I’ve Tried:
I successfully implemented the first step for the Client column. In its validation formula, I used:
‘if(thisRow.[Date].IsNotBlank(),thisRow.Filter(thisRow.[Client])’)
This works perfectly—you cannot add a Client without first entering a Date.

The Problem:
I can’t figure out how to apply the same logic to subsequent columns. For example, I want the Title column to require a Client. I tried reusing the method with a formula like thisRow.[Client].IsNotBlank() under the validation rule for the Title column, but it doesn’t seem to work as expected.
Is it possible to create this chain of dependent validations? If so, what is the correct way to set up the validation rule for the Title, Description, and Employee columns?
Any guidance would be greatly appreciated!

Since you are talking about the validation formula, I am assuming your question is related to the form view. Why is it not enough that all the fields are filled before pressing submit? Are you trying to pull information for other fields based on what the user selected on previous fields?

Anyway, it would be helpful if you could share a dummy doc.

Thanks for getting back to me, I think it can be done in form view, but I’m looking something in table view.
To clarify, my question is specifically about data validation in the table view, not the form view.
The Scenario:
I have columns A, B, C, and D. I need to enforce that:
Column B cannot be filled unless Column A has a value.
Column C cannot be filled unless Column B has a value.
Column D cannot be filled unless Column C has a value.
The Problem:
I can achieve this for a dropdown (select list) column using a conditional formula like if(!isblank(${A}), thisrow.B, null).
However, I cannot figure out how to write an equivalent validation formula for a text field.
Could you advise on the correct formula syntax for this cross-column validation in the table view?

What you are trying to achieve is not possible and that formula you wrote is not even Coda Formula Language. Please tell us WHY are you trying to achieve that, so that we can propose different methods or workarounds.

Thank you for your reply and my apologies for the confusion. The formula I shared was incorrect because I altered it to avoid sharing sensitive data from our table. A more accurate version of what I was attempting is:
if(a.IsNotBlank(), thisRow.Filter(username-tbl)," ")

Its purpose is to pull data from another table if a condition is met. I’ve discovered this works for a Select list column type but not for a Text field.
I am currently experimenting with a Button-based solution to achieve a similar outcome and will be happy to post my findings once it’s working.

To answer your question about why I need this: I am trying to streamline our internal workflow without using copy/paste.
Our Process:
We have three departments: Helpdesk, Developer, and Testing.
Helpdesk enters a customer issue into a table.
To assign it to Developers, they copy and paste the row into a separate “Developer” table.
Developers then copy and paste it again into a “Testing” table when their work is done.

My Goal:
I want a single table where a row moves automatically between views based on the “Assigned Department” column. For example:
When Helpdesk sets the department to “Developer,” the row vanishes from their view and appears in the Developer’s filtered view.
When a Developer sets it to “Testing,” it moves to the Testing team’s view.
This would eliminate manual copying and create a clear, automated workflow. Any guidance or alternative methods you could propose would be greatly appreciated.

A very easy solution would be to have your base table hidden and have a view per department. Each of those views would have filters to only show the rows assigned to them and you can configure which columns are displayed in each view.

This is easy to set up and solves your basic pain, but it won’t prevent that people from one department go to other department’s page and modify stuff that they shouldn’t be able to.

Here you have a description of a more robust solution, assuming you are on a team plan and can lock some pages:

  • Create a table with all the users and assign them roles/departments. Lock it.
  • Create different views per department and put them in hidden pages
  • Create different layouts per department with the fields that each need to see/modify
  • Make sure that each view has the correct layout assigned
  • In your main table, create a button that opens the current row using a specific view depending on the department of the current user. Something like this:
[User Table].Filter(User=User()).First().Department.Let(dep,
  thisRow.OpenRow(
    viewOrLayout: dep.Switch( 
      "Helpdesk",[Helpdesk view],
      "Developer",[Developer view],
      "Testing",[Testing view]
    )
  )
)
  • Remove all fields from the defaul layout except from the button we just created.
  • Filter your table to only show rows assigned to the department of the current user’s department and make sure the button is visible

If you implement this correctly, users will only be able to see/modify the fields in the view you configure for their department. The rows not assigned to their department will be hidden, but unfortunately could still be found in other ways, like search. To make sure users can’t see data from other departments you would need to create other docs and sync only the relevant rows via Cross-Doc.

If you need validation and other fancy behaviours before the input from users is stored, it can be achieved with a helper table and adding a button to save the data, but that would be a bit more complex to set up.

Let me know if this helped you!
Pablo

1 Like

Thanks Pablo, I think this the fix for my problem.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.