You have to have a State check on the previous item so there has to be something that tells us when the State ='s finished. Do you have a field you can use to do that?
I have the below suggestion as well, there are multiple ways to do it, I'm looking at it from a Wizard perspective, not just from a Gallery perspective.
So one thing I would suggest is that you have a Step number and Status in your Data. since you essentially want your steps to be in a Gallery, and you want the people to only be able to click the buttons and do something at that step when the previous step is done, adding a Step value and Step Status would allow you to both Sort and would easily allow you to do what you want.
I get you want to use the controls, but that is not a good way to do it, as you may change later on you do this.
So imagine this
In your data you have the Step # (1,2,3,4,5,6)
For Step Status it would be simple as a boolean essentially is this step down or not
Remember, people might come back later and not complete the whole thing so you need a way to know which things in the Gallery should be blocked or not blocked if they don't complete it all at once time.
So in every item you can easily do this for the controls you want locked or unlocked
Let's pretend this is the DisplayMode
What it does is says, if I am on gallery item 1 just leave the button or whatever in edit mode as I am not done
If I am not Row 1, then take my Step Number and subtract 1 and see if the previous row is completed
If(Step Number = 1,
DisplayMode.Edit
,
// For every other row it would come here and do this
LookUp(DataSource/MyCollection, Step Number = ThisItem.StepNumber -1).Step Status
)
Now to wrap this up we need to make sure that the Data keeps the Step Status updated
So in your button that would save or complete the current step you would also want to do
Update(DataSource/Collection, ThisItem, { Step Status: true });
Now the next row automatically unlocks
Last thing.
If you allow people to come back later, we need to figure out, as we load the data into the gallery if the buttons and the Status of the row should be set to true or not.
If you are interested in talking more let me know.