i have a master-child relationship. Customers is the master, CustomerVisits is the child. Within the Customers editForm1 I have a dataview that allows me to create CustomerVisits records. Simple enough.
I also have an "All Customer Visits" page with the standard grid1, editForm1, createForm1. Works as expected.
My problem is when I create a visit record from the All Customer Visits page, I need to show a lookup contol to allow selection of the customer. In the dataview, I don't want to show that control because the parentID is being passed to the child record already- the control is not needed and is confusing.
I haven't figured out the answer. I can't find a "visible when" I can use, thought about creating a second createForm1 but not sure how to control which view is selected. Also thought about cloning the controller (pretty sure that will work). Still, hate to plunge down that path if I'm missing something simpler.
Thanks in advance for your suggestions!
Help get this topic noticed by sharing it on
Twitter,
Facebook, or email.


-
Not sure if I have interpreted your question correctly but If you are going to create a record using the All Customers Visit create1 page you will need that look up on the create page in order to relate the visit to the parent record. You could just remove that look up field from grid1 and the edit page or mark it as hidden if you didn’t want to see it. If I have misunderstood my apology maybe if you post a screenshot
-
-
Thanks, but that's not exactly what I'm looking for. I want the lookup control to be visible on createForm1 when creating a record from All Customer Visits, but I want it to be hidden on createForm1 when creating the record from a gridview.
I can definitely do it by cloning the controller but was hoping for a more elegant approach. -
-
Assuming that when creating from gridview the control already has a value then you could set the control's "Visible When" to only be visible when the control is empty (null) or zero (assuming that it is zero when empty) or whatever value your control has when empty.
e.g. set the "Visible When" to [YourControlName] == null
etc. -