conditions and queries


I have a very unique process that I am trying to build with SKUID and I was wondering if I can get some help as usual please.

I have a parent object (Enrolment) and child object (Units) in Salesforce. Units have lookup to Enrolments and one Enrolment can have multiple units.

I would like to build a model off Units and filter units based on a specific name, however this specific unit can only be displayed on my list only if its preceding unit is completed.

Is there any way I can achieve this with models and queries?


Here is one idea: -Have the unit records be auto numbered in Salesforce. This will create a sequence that can be used to determine what the previous record was - create a condition that displays only Incomplete units. --Sort the unit model in as sending order based on the Salesforce auto number field. - restrict the number of records allowed to load in the model to 1. The idea is that no completed records would be displayed and only 1 incomplete record will be displayed which would be the lowest sequentially numbered record that is marked incomplete.