How best to set a user editable date field with the value from another?
I have a date field (expirationDate) that is entered by users.
I would like to set this field programatically when an Extension Request is granted (another user entered date field in a sub form).
I was thinking of creating a calculated field on the main application that is set to the date of the most recently approved extension (activeExtensionExipDate) and then set that parent application record's expirationDate to the activeExtensionExipDate via a set date action DDE but I that type of action does not allow other datefields to be used as a value to be set.
Do I need to use a datafeed?
Is there a simple custom object that could be used instead in order to get a more real time display?
- calculated field
- Community Thread
- Forum Thread
- RSA Archer
- RSA Archer Suite
Couldn't you just use a helper field and a calculation? Then it wouldn't matter how it gets set, your calc would always fire.
You can make Expiration Date a calculated field and set its value to the value of your helper field (Manual Expiration Date) unless there is an approved Exception Request.
Maybe i'm being dumb here but if it's a calculated field can an editor set it?
I thought it would be read only at that point.
I would like the date to be both set by the related exception request date and be editable by a user.
No, you are correct. Making the field calculated also makes it read-only. But that's where the helper field comes in. You provide a manual entry field that is editable so users can effectively edit the calculated value. This allows the calc to do something like: exception request expiration date if there is one, if not, whatever value the user entered in the manual entry field.
So the complexity is that this "manual edit" field will always have a value from the initial record approval.
Subsequently upon expiration an extension sub form record will be approved with its own 'requested date' that I want to automatically populate in the parent record's expiration date field.
I still want that field overridable by those with the right role.
Would I need another 'helper' bitwise like field that is set upon extension approval that the calculation needs to consider in order to overwrite whatever is in the manual edit field?
I also want to avoid having a 'blank' date field just for overriding purposes right next to a read only field that is the "actual" exipiry date.
I think you can accomplish your business requirements. Using a manual override field is a pattern we have used successfully in many similar circumstances. It's not a one-size-fits-all solution, so you may need more than one, and your calculation formulas will need a careful look. But based on what you are describing, I think this pattern can help you get there.
Ok, I'm intrigued but still am confused at the implementation in order to:
- ONLY set the date when the sub form has a new approved extension record
- I know in a calc I can read the most recently approved sub record date but how do I only do it once so that it doesn't undo a manual override?
- NOT have two fields on layout, the read only calculated field and the 'manual override' for editing purposes
So, if I understand correctly, when the subform gets a new record, if that record has specific attributes, we want to use it in a calculation. Otherwise, we use whatever is in the field now. Is that correct?
You would end up with two fields on layout: The calculated field and the override field. I don't know of any way around that.