Victor Warner wrote:
> Thank you for the responses and pointing out the error of my ways! I can
> see now clearly where I was going wrong.
>
> Having clarified my thinking I have a related question which I would
> appreciate some help with following:
>
> Panel 1 contains a number of fields including: A field to capture the
> name of the client which can be an individual or a company, and another
> field which is a flag field and which is either a "I" or "C" (format A1).
>
> In a second panel I will have a name field (among other fields, which I
> will be using the subfield function).
>
> What I would like to do in Panel 1 is that if I enter a name in the name
> field and an "I" in the flag field then a record is created in the
> second panel, putting the name in the name field. But if I type a name
> and "C" in the flag field then no record is created in the second panel.
>
> Trying a combination of data links and If statements does not seem to do
> it. Help with this would be greatly appreciated.
>
> Victor Warner.
Causing a subpanel to create a record upon creating a record in the parent
panel isn't hard. You can use Keep A Total for that. But that will create a
record in the subpanel *every* time you create one in the parent panel.
What if you let that happen, but keep people out of the subpanel when the
Flag Field has value C? You can probably do that by using a ::C field in
the Panel Link Field List that takes you to the subpanel.
Alternatively (I have never tried this), what if you have a field in the
subpanel that matches the Flag Field in the parent panel and then place a
formula on that subpanel Flag Field that changes itd svalue to 'X' if it's
not 'I'. Something like this:
if FlagField='I' then 'I' else 'X' endif
(To be updated on any change)
If the FlagField is in the Field List of the Panel Link that takes you from
the parent panel to the subpanel, I think this will keep the user from ever
landing on a subrecord of a parent record that has C in the Flag Field. Try
it. In fact, it might even keep a record from being created with the Keep A
Total in the parent panel in the first place. Not sure about this. I'd try
it.
_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf