Disable add button of child/related table from Parent table based on criteria

Hi team,

I am creating/Viewing the Parent table (Inspections), and I would like to to disable the Add button of the Child table (Inspections_defects):

3X_9_a_9a0925f08e0842cd28d7d5d53f57c1d8736c53db.png

based on a criteria that if the record you are viewing was created today.

The criteria I have in the Add action of the child table is this:

I have tried other formulas, but always I just get to disable the Add button regardless the formula criteria:

record created yesterday:
3X_a_e_ae3014d369d19747523b82ae3b4994925bf109aa.png

not add button. Seems working fine.

record created today. Should be visible the Add action. Not workin:
3X_1_6_1657b91e8b227e8ac4ae596c46472c37dbe64912.png

Solved Solved
0 4 1,028
1 ACCEPTED SOLUTION

I had the same problem before but i ended up creating two slices of child records.
The first slice is the TODAYโ€™s Date which is ADD, EDIT, DELETE are enabled.
Set [Parent].[Date] = TODAY()

The 2nd slice is NOT TODAYโ€™s Date which is Read-Only or you can disable ADD only.
Set [Parent].[Date] <> TODAY()

Next step is creating two REF_ROWS(โ€œChild Recordsโ€, โ€œParent IDโ€) in Parentโ€™s Table.
Change both the Referenced table name with those two slices created.

Last step is change the SHOW_IF of both child refs
Todayโ€™s child records can be [Date] = TODAY()
Not Todayโ€™s child records can be [Date] <> TODAY()

There should be a better way but this one works for me at the moment.

View solution in original post

4 REPLIES 4

I believe your requirement is similar to the one in the post below. โ€œAddโ€ action is not row level, so I believe row level conditions will not apply. Please explore the below approach.

thanks @Suvrutt_Gurjar!!

I had the same problem before but i ended up creating two slices of child records.
The first slice is the TODAYโ€™s Date which is ADD, EDIT, DELETE are enabled.
Set [Parent].[Date] = TODAY()

The 2nd slice is NOT TODAYโ€™s Date which is Read-Only or you can disable ADD only.
Set [Parent].[Date] <> TODAY()

Next step is creating two REF_ROWS(โ€œChild Recordsโ€, โ€œParent IDโ€) in Parentโ€™s Table.
Change both the Referenced table name with those two slices created.

Last step is change the SHOW_IF of both child refs
Todayโ€™s child records can be [Date] = TODAY()
Not Todayโ€™s child records can be [Date] <> TODAY()

There should be a better way but this one works for me at the moment.

Thanks @Jervz very very detailed, I will definitely try thi. Thanks a lot!

Top Labels in this Space