I have a situation where there are activities being carried out in two shifts A & B. I have included following validation for avoiding the duplication of data entry for the respective shift.
OR(
ISBLANK([Date]),
ISBLANK([Shift]),
ISBLANK(
FILTER(
"P1A",
AND(
([_ROWNUMBER] <> [_THISROW].[_ROWNUMBER]),
([Date] = [_THISROW].[Date]),
([Shift] = [_THISROW].[Shift])
)
)
)
)
Now I also need to ensure that data entry of Shift A to be entered before Shift B, meaning if the data for Shift A has not been entered then the data entry for Shift B should not be allowed.
Looking for help on how can I modify the above validation to achieve the desired result of entering Shift A data prior to Shift B data. And how the same can be modified further if there are more than two shifts.
Just FYI:
I take it from this that the P1A table uses the [_RowNumber] as the key
I would suggest that you actually create a table in your app that will hold information about the various shifts required. Not a table to hold information about the actual shifts people are working, but information about the shifts themselves.
If you created a Shifts table, you could include a column that holds the Key value of the prior shift.
Then, inside the table where you record the actual shifts from employees, include a reference link to that Shifts table,
Another table can be created but still not clear how it would help. Would appreciate if you can explain the reference & dereference thing with the help of an example.
@Neeraj_Malik Think about the details in this new table as the settings for things that people are recording, the requirements for each shift thatโs being created.
Inside these โsettingsโ records, you can create any number of things you might want to enforce on something. In your case, you only need to know what came BEFORE.
This is kinda a complicated topic, so I made a video showing a similar setup I made previously; the video got long (4 min), but I hope you can glean some insight from it.
User | Count |
---|---|
36 | |
32 | |
30 | |
18 | |
16 |