Jump to content

This topic is 7580 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I am trying to set up an auto-enter date field in a file ACTIONS that gets its initial value from a calculation based on a date in a related file EVENTS and adds the number of days specified in the related file PROCESSES.

This field should not update when related fields change.

Defining the field as Date and setting Auto-Enter calculated value to

EVENTS::date + PROZESSES::nextAction

(this is a number field) just does not come up with a proper date

The same formula works great when the field is set up as a calculation field. But I do not want this as it should not update.

There must be something very basic that I am doing wrong.

Please, any help is greatly appreciated.

Thanks,

Oliver

  • Newbies
Posted

The field PROZESSES::nextAction is supposed to schedule the next action in terms of weeks. Using a date field forces input in a format like dd/mm/jjjj. By using a number field it will accept the input "1" for one week. Simply adding the number field in a calculation field (date output) works fine, same as using that formula in a script. But I would really like to do without a script in this case.

Posted

If you are also auto-entering your key fields for EVENTS and PROZESSES, it may be that the timing is off for auto-enter. That is, FM auto-enters your desired field first, using invalid relationships (since the two keys are currently empty), and only THEN auto-enters the key fields. Could you maybe script entry into the field instead of using auto-enter?

Jerry

  • Newbies
Posted

The fields used for the calculation are not auto-entered. But maybe it is a timing issue anyway. The ACTION records are created through a portal in the EVENTS file. I have two problems with scripting it:

1) from a user perspective it is not intuitive to make your selections in the portal and still have to push a button to activate your settings. Or is there a way to activate the script automatically, e.g. upon creation of a new record in the ACTIONS file?

2) as the user might create more than one new action in the portal, how could a script create new ACTION records with proper input for all of them?

My experience with all of that is quite limited. It all worked so nicely before I had to change the field type of the field storing the date of the ACTION records from calculated field to date field.

Posted

Try flagging 'Do not calculate if ... empty' and also put a Case (if invalid relationship) in front of the calculation.

Note thew 'Try'. This is a suggestion not a solution.

This topic is 7580 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.