Jump to content

This topic is 6197 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Here is my question. There are many jobs, and each job has many tasks, which may/may not have many sub-tasks, whcih may/may not have many sub-tasks.

disregarding the sub tasks.

the tasks have an id(not primary key, i also have a serial). that is used to identify that task within that job. i need to have these task numbers unique within a given job. but duplicates may exist outside of this job.

What would be the best way to apply this validation and any ideas ont the sub-task structuring would aslo be helpful. Thankyou

Brendan

Link to comment
Share on other sites

You could have a calculated field = Job_ID & Sub_ID

With the Sub_Tasks:

Each Sub_Task has a "Belong_To" field and so each Sub_Task belongs to a Sub_Task.

That now means that a Sub_Task can have "child records" ie all The Sub_Tasks that have the belong_to ID of the current Sub_Task.

This will give you any depth of subtasks just like a tree.

Edited by Guest
Link to comment
Share on other sites

I have done things like this using a self join on the sub tasks table.

Task ID = Task ID

and

SubTask Number = Subtask Number

Then do a validation by calculation that looks like:

if(isValid(SelfJoin::Field); 0 ; 1)

May not be the best way, but it does work for me.

Edited by Guest
Link to comment
Share on other sites

This topic is 6197 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.