Checkbox on Child Form

I have a child form that inherits values from a parent form. I have a checkbox on the child form that gets it’s values from a multi-value comma separated field on the parent form.

When I create the child form the checkboxes appear OK. (one for each of the items in the multi-value list). The problem is that after I select some of the checkboxes and save the form. When the child form is reopened (for reading or editing)… there is only one checkbox… it’s empty… and none of the labels/values are there. There are no hide when formulas for the field. All other fields that are inherited show up fine.

I am thinking that I may have to create another field to recieve the values that are checked… and then display only when the doc is not new. I also only need the checked values and none can be “selectable” once the form is saved for the first time.

Does anyone else have another suggestion ?

Thanks

Margie

Subject: Checkbox on Child Form

Hi.

Does this functionality works on web. If Yes, Please help me out by sharing if. I am trying to achieve this on web but not successful though. Trying…If you could help, I would be ever greteful to you.

rgds

vvk

Subject: Checkbox on Child Form

Hi.

Does this functionality works on web. If Yes, Please help me out by sharing if. I am trying to achieve this on web but not successful though. Trying…If you could help, I would be ever greteful to you.

rgds

vvk

Subject: @DbLookup()

Use an @DbLookup() formula to get the value of the multi-value field from the parent doc.

Subject: RE: @DbLookup()

The parent doc gets the values for the field from a dialog list whose choices are from a dbcolumn in a view in another database when it is created. The field then shows only those values that are selected in the dialog list.

I want the child document to have a list of items to choose from when it’s created. This is successful. Then when the doc is opened after initial creation I want it to only show those items that were selected at creation. I have done this successfully too… by creating a separate field to hold the values as I suggested. However, when the doc is saved the second time… the values disappear.

I will try this.

Margie

Subject: Checkbox on Child Form

The problem is that you are getting your choice list as well as the selected values from the parent document. Since a checkbox can’t “allow values not in list” (how is the user going to check a box that ain’t there?), the values can’t be maintained once the choice list is gone. This means you need to save the choice list in a separate field (hidden text multi-value, editable with a default value formula pointing to the current source) above the checkbox, then use that field as the choice list formula for the checkbox.

Subject: RE: Checkbox on Child Form

Nope. Here is what I have:

Child form inherits values from Parent.

Field DeleteList - type=Text / Computed Allow multiple values Default Value is Server (this is the name of the field on the Parent Form)

Field List - type = checkbox / editable Allow multiple values. Use formula for choices

Formula = @if(DeleteList!=“”;DeleteList;“garbage”)

When the child is created both fields contain data. After making selections in the checkboxes and saving… both fields are void of data and the only thing showing is a single checkbox with “garbage” as a title.

Of course the List field is empty because it points to the deletelist field which is also empty after save…and so we are back to the same thing… unless there are some attributes that I left out.

Subject: RE: Checkbox on Child Form

GOT IT… the DeleteList Field has to be the same name as the parent form in order to save the values. DUH

Subject: RE: Checkbox on Child Form

Not exactly.

The values from the parent document are only available while composing – as the document is being opened – and not later in the same editing session. So if a computed field formula refers to a field Server, when you open the document it will use the value from the parent. But when you later go to save the document, it will try to find a field named Server on the current document – not on the parent document. If no such field exists it uses the value “”.

If you give the inheriting computed field the same name, then when its formula is evaluated during save, the name refers to that same field – you’re copying the field from the current document to set that field’s new value – so it doesn’t change.

But another way to accomplish this which is more efficient, is to make the inheriting field Computed when Composed. This is more efficient and you can name the field whatever you like.

The difference is important because sometimes you’re not inheriting the exact value from the parent. E.g. suppose you had an computed Subject field with this formula:

"Re: " + Subject

Every time you recalculate the fields, by saving or pressing F9 or other ways, another “Re:” is added to the beginning.