Hi. I have a table called Routings_Master and an ‘IsPartOf’ table called Dresser_Master. I want to only allow the user to add 1 Dresser_Master record after which the ‘New’ button would be hidden from view when they are returned to the Routings_Master screen.
In the ‘Only if this condition is true’ element of the ‘Add’ action for the Dresser_Master table I have tried expressions like ISBLANK([Record ID].[Related Dresser_Masters]) or
COUNT([Record ID].[Related Dresser_Masters])=0
Could someone help advise on how I might achieve this?
Thank you.
One option is
-
Create a read only or read only /update only ( but no add option) slice as you want on the Dresser_Master table called say Dresser_Master_Slice
-
Create a VC in Routings_Master table with an expression as
REF_ROWS(“Dresser_Master_Slice”, “Ref Column name of RoutingS_Master in Dresser_Master table”)
Show_if for this VC
COUNT([Related Dresser_Masters])=1
- In the system created reverse reference column in Routings_Master table that may have name something like [Related Dresser_Masters] ( Also used in show_if in 2 above) , you could have a Show_If as
COUNT([_THIS])=0
1 Like
Thank you for this @Suvrutt_Gurjar.
I will implement and test your suggestion.
1 Like
Thank you @Suvrutt_Gurjar. This appears to have done the trick for me.
2 Likes