0

I need a formula where if the custom field (type:currency) is not edited while the record is edited and saved, the custom field value should become zero otherwise it should hold the new value which is entered while record is edited. I think this can be done with (PRIORVALUE function) but i can't work out the logic.

Any help would be really appreciated.

1
  • Do you want to populate a new or previous value? You've mentioned PRIORVALUE formula and it's used to get the prior value of changed field.
    – o-lexi
    May 6, 2016 at 18:19

1 Answer 1

1

I think you are looking at a workflow on the SObject the currency field belongs to.

The condition formula should evaluate upon created, and any time it's edited and would look something like

AND(
    (!ISCHANGED(CurrencyField)),
    (CurrencyField != 0)
    )

Then you can add an update action and set the CurrencyField to 0

CurrencyField=0
3
  • 1
    This is on the right track, but the workflow will need to fire when created, and any time it's edited. This is because you can't use ISCHANGED() with a subsequently meet criteria workflow rule. I would also add an entry criteria item for (CurrencyField != 0) to avoid running the rule when it just stays at zero. May 6, 2016 at 11:09
  • @ Jeremy Nottingham thank you for the suggestions, I've just edited the post May 6, 2016 at 11:14
  • This is more complex as you would think - 2 worklows are needed: one to set 0 value, and another to populate the new value of CurrencyField. But even having these two, somehow you have to track when edit accured by the user and not by any type of automation (assuming this was in his requirements)
    – o-lexi
    May 6, 2016 at 18:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .