I have a form that has about 10 tasks that are identified by entering a date to indicate they are complete. As the dates are entered they are counted and used in calculations elsewhere in the database. The dates all have a hide formula so they are not visible until the milestone immediately preceding it has been completed. The problem is if someone enters dates for say the first seven tasks, then goes back and deletes the date from task three, there will still be a date in the fields for tasks 4,5,6 & 7 even though they will not be visible to the user. The end result is that it throws off all of the calculations.
Can someone give me some advice as to the best way to handle the situation? I would like to code all of the fields so the value cannot be deleted if any of the fields that follow it still contain a date but wouldn’t know how to go about that. Any help would be appreciated.
Thanks - Kurt
Subject: Help with workflow
Add a computed for display field for each date and let each display the contents of the editable field.Hide the editable ones when deleting the contents is not allowed and show the computed for display ones instead.
You may need to set “auto refresh” for this to work or refresh when exiting each field.
Subject: Help with workflow
In the exiting event for the field that is blank (controlling the hide whens) should blank out the other fields in the one controlling the hide whens are blank.
This way you won’t have fields with data in that cannot be seen.
Also control in the calculating field or event, to handle null values.
HTH,
Ranjan
Subject: RE: Help with workflow
A user could blank out date2 and then press Esc, and save their changes. The exiting event for date2 never fires.
Instead, you could put the same logic into the QuerySave event of the form.
Another option is to make the hidewhens consider all of the preceeding date fields, not just the one field that is immediately-preceeding.
Subject: The best place for this would be in the Input Translation formula for the field
i.e.Field NextField1 := @If(ThisField = “”; “”; NextField1;
Field NextField2 := @If(ThisField = “”; “”; NextField2;
…
ThisField