Forum Discussion
Hi Mark,
The button is only clicked for data entry, creating a child record. If the button has the case in it, why would it lead to the wrong form?
I tried using Sections, which I think would work if I could make the field show up twice on the form such that it only appears once because sections are hidden based on a form rule. But although you can add some fields twice to the form, you can't add all types of fields multiple times to the form. Even then, I still might run out of form rules.
There are 19 types of Juice and about 50 fields for data entry. There are just too many combinations with just enough overlap in fields to make it super complicated.
I really wish I could just add some more form rules.
------------------------------
Kim G
------------------------------
There is no practical limit to the number of form rules as long as they are based on scalar (data entry) fields for the rule. But you will need 50 rules, once for each field.
So, if you do want to go with multiple forms and you have a use case where you are creating child records, then yes, you can make an Add Child button on the Parent record which will use the correct form to Add.
I suggest that you use make a formula text field on the Parent called
[Child Form Number]
Case([Juice Type],
"Type 1", "11", // these are the form ID's on the forms list.
"Type 2", "12",
"Type 3", "13",
etc
"Type 20", "31")
The Add Child button can look like this
URLRoot() & "db/" & [_DBID of the child table]
& "?act=GenAddRecordForm"
& "&_fid_xx=" & [Record ID#] // populate Related Parent
& "&dfid=" & [Child Form Number] // set the correct form
Then similarly, you would lookup the [Child Form Number] down to the child record. Then make two fields on the Child form for View ad edit.
[View]
URLRoot() & "db/" & dbid() & "?a=dr&rid=" & [Record ID#]
& "&dfid=" & [Child Form Number]
[Edit]
URLRoot() & "db/" & dbid() & "?a=er&rid=" & [Record ID#]
& "&dfid=" & [Child Form Number]
Then for the embedded child table on the parent form, configure it to have those two fields as the first two columns of the report and edit the report so as to deselect Allow View and Allow Edit. That will suppress the native eyeball and edit pencil icons on that embedded report, forcing the user to use your buttons which will select the correct form.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------