millmaine Posted March 1, 2015 Posted March 1, 2015 I have 3 fields: START DATE — user selects date from calendar RUN — user enters number of days over which activity will occur END DATE — Calculation based on first two fields. This works fine BUT we want the user to have the option of entering the END DATE directly and have the RUN calculated. I changed both RUN and END DATE to Calculated Values but with no luck: changing RUN still changes END DATE (which is good) but when END DATE is changed, RUN doesn't change and END DATE consequently reverts to original value.
Rick Whitelaw Posted March 2, 2015 Posted March 2, 2015 This is not making sense to me. A calculation field is not modifiable by user input. Perhaps you're speaking of the fields being auto enter by calculation with allow user override enabled.
comment Posted March 2, 2015 Posted March 2, 2015 Make EndDate auto-enter a calculated value, replacing existing value = Case ( Get ( ActiveFieldTableName ) & "::" & Get ( ActiveFieldName ) = GetFieldName ( Self ) ; Self ; StartDate + Duration ) Make Duration auto-enter a calculated value, replacing existing value = Case ( Get ( ActiveFieldTableName ) & "::" & Get ( ActiveFieldName ) = GetFieldName ( Self ) ; Self ; EndDate - StartDate ) Alternatively, this could be solved by script triggers. 3
comment Posted March 2, 2015 Posted March 2, 2015 Where do you come up with this stuff? I've had it all along and it was published before, and not just by me. IIUC, you should find something very similar if you search for Celsius and Fahrenheit. I modernized this when GetFieldName() became available; before that you had to hard-code the field's name in the calculation and it would break if the field was renamed.
millmaine Posted March 3, 2015 Author Posted March 3, 2015 Comment's solution works beautifully. Thank you.
Recommended Posts
This topic is 3609 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 accountSign in
Already have an account? Sign in here.
Sign In Now