How do I add a conditional to a constraint?

I’m experimenting with a different approach to a hierarchical task list.
I plan to have a type: Task with a Field: Sort (text) using a number and dot notation to figure sort order and parent relationship. The child task would be in a repeating group nested in the parent task RG to display like this:

  • Task 1
  •  Task 1.1
    
  •  Task 1.2
    
  •      Task 1.2.1
    
  • Task 2
  •  Task 2.1
    
  •  Task 2.2
    

For the top tier repeating group (Task 1 and Task 2) I can “do a search for” tasks where job = a selected value and Sort does not contain arbitrary text “. (period)”
I had hoped I could put a nested repeating group in the Tier 1 cell and populate it with a search for tasks where Job = same as parent cell’s task and then extract out some conditions on the sort field. For example, to get Task 1.1 and Task 1.2 to appear in the RG within the cell that contains Task 1, the sort field would contain the text “1.1” and “1.2” and I would like find a way to say in a sense, "include this task if the first number is = this cell’s task’s sort first number and only has 1 “.(period)”.

I could then continue that logic in the next nested RG "only include this task if this task’s sort text contains a “.” and if the numbers before the first “.” and after the first “.” equal the parent Task’s sort.

I can figure out the RegEx, I just can’t figure out where I can put it to evaluate it to get the results. Any thoughts?

I created an unlimited nested repeating group structure on our eLearning Hub that you can check out. It goes about it in a different way, a little bit simpler way.

Check it out: NoCodeMinute - eLearning Hub

It’s a paid feature of the eLearning Hub. It might be worth it to save you hours of frustration though. :man_shrugging:

Thanks for the reply. If I use your structure, can I have it show me only tasks filtered by job, and then can I copy them all to a new job, and have it preserve the hierarchy?

I currently have a different approach working where the child RG filters on the parent’s task. The Task has a field called Parent Task of type Task, so you can have unlimited generations of child tasks, but when you bulk copy, all of the copied tasks reference the previous parent task. I’m looking for a way to preserve the hierarchy in that scenario that also allows me to drag and drop to rearrange the sort order as well as rearrange hierarchy.

I’m sure it could but it seems like it would be a mix of what you have and what I have to get it to work. Mine is still based on a simple regex too. It’s also based on spacing with conditions.