PDA

View Full Version : user named browse on a form & calc field


ABC123

Karyl Cardullo
01-13-2004, 01:40 PM
I have a browse with a calc field using a global variable in one column and color and font equations based on its value. It works fine stand alone but when I place it on a form the values for the calc field are missing. The color font equations don't function (possibly because they are dependant on the calc field). Any help would be appreciated.

Karyl

Scott Emerick
01-13-2004, 03:59 PM
Karyl,

Can you post an example or your calc field .. the name of your form ect.

This would be helpful in knowing what the problem is exactly.

Check any references to fields and alike as they can change when added to a form, for example MYBROWSE when placed on a form can change to BROWSE1

Scott

Tom Cone Jr
01-13-2004, 04:13 PM
Karyl,

Check to see if the calc field is present in the new form. I'm thinking maybe you defined the calc field in the old form layout, employed it in the browse object, and then 'lost' it when the browse got moved. The browse displays the field it does not define it. Hope this gets you going in the right direction.

-- tom

Karyl Cardullo
01-13-2004, 07:45 PM
Tom,

That is exactly what happened. The calc is defined in the original browse (which is used stand alone sometimes). The form is on a set with a child file. The browse is on the child file. I didn't see an option to define the calc field when you use the predefined browse layout.

Karyl Cardullo
01-13-2004, 07:59 PM
The calc expression is:
daysdiff(nextdue(done_last,frequency,WKmo),VAR->gv_datefrom)

daysdiff and nextdue are functions I wrote to handle a scheduling formula. The result of daysdiff is a number and is clearly working when opened as a browse.

done_last is a date
frequency is a number
WKmo is character indicating weekly or monthly
gv_datefrom is a date stored in a global variable

I would like to avoid the maintenance of defining the browse twice but that calc field and the color equation is vital for it to be useful.

Karyl

Tom Cone Jr
01-14-2004, 01:07 AM
Karyl,

My experience with using saved browse layouts within forms is a bit limited. I mostly use embedded browse objects. So, what follows may not be of much help.

I would try to redefine the calc field in the current form.

I'd also watch out for field or column name changes that Alpha Five may have done automatically to avoid having objects with duplicate names appear in your form.

-- tom

Karyl Cardullo
01-15-2004, 06:34 AM
How do I check that? I didn't see anyway to get at the field definitions when using a pre defined browse.

I did try defining the calc on the form referring to the child file fields and did it using the same name as well as a different name but neither worked. Using a different name for the calc field I couldn't see how to link it into the predefined browse.

Karyl

Tom Cone Jr
01-15-2004, 09:34 AM
karyl,

zip the database and post it here with directions so that we can find the form & browse that are involved.

-- tom