Create a formula text field to display prior value or text field?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite












I'm wondering if it is possible to create a formula field that will display the previous value of a text field.



Example:
If an account name is changed, display that previous value in the formula field. I tried: PRIORVALUE(Name) but received an error of "PRIORVALUE may not be used in this type of formula"










share|improve this question



























    up vote
    1
    down vote

    favorite












    I'm wondering if it is possible to create a formula field that will display the previous value of a text field.



    Example:
    If an account name is changed, display that previous value in the formula field. I tried: PRIORVALUE(Name) but received an error of "PRIORVALUE may not be used in this type of formula"










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I'm wondering if it is possible to create a formula field that will display the previous value of a text field.



      Example:
      If an account name is changed, display that previous value in the formula field. I tried: PRIORVALUE(Name) but received an error of "PRIORVALUE may not be used in this type of formula"










      share|improve this question













      I'm wondering if it is possible to create a formula field that will display the previous value of a text field.



      Example:
      If an account name is changed, display that previous value in the formula field. I tried: PRIORVALUE(Name) but received an error of "PRIORVALUE may not be used in this type of formula"







      formula-field






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 1 hour ago









      tDactyl

      62




      62




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote













          No, there is no formula for this; formula functions like ISCHANGED and PRIORVALUE only work in the context when a field value is transitioning from one value to another (i.e. during a DML update). Old values are not stored in the database (other than field history, which can't be used in a formula anyways).



          The best you could do is create a text field called something like "Field Previous Value," then set a Process Builder/Workflow Rule that copies the prior value of the field to this second text field when the field changes. As a workflow example: "Evaluate when the following formula is true: ISCHANGED(FieldName)" with a workflow field update "Previous Field Value set to formula PRIORVALUE(FieldName).






          share|improve this answer






















          • Exactly what I was looking for. Thanks, Sir.
            – tDactyl
            1 hour ago










          • @tDactyl You're welcome. Always glad to help.
            – sfdcfox
            1 hour ago










          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "459"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f238524%2fcreate-a-formula-text-field-to-display-prior-value-or-text-field%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote













          No, there is no formula for this; formula functions like ISCHANGED and PRIORVALUE only work in the context when a field value is transitioning from one value to another (i.e. during a DML update). Old values are not stored in the database (other than field history, which can't be used in a formula anyways).



          The best you could do is create a text field called something like "Field Previous Value," then set a Process Builder/Workflow Rule that copies the prior value of the field to this second text field when the field changes. As a workflow example: "Evaluate when the following formula is true: ISCHANGED(FieldName)" with a workflow field update "Previous Field Value set to formula PRIORVALUE(FieldName).






          share|improve this answer






















          • Exactly what I was looking for. Thanks, Sir.
            – tDactyl
            1 hour ago










          • @tDactyl You're welcome. Always glad to help.
            – sfdcfox
            1 hour ago














          up vote
          3
          down vote













          No, there is no formula for this; formula functions like ISCHANGED and PRIORVALUE only work in the context when a field value is transitioning from one value to another (i.e. during a DML update). Old values are not stored in the database (other than field history, which can't be used in a formula anyways).



          The best you could do is create a text field called something like "Field Previous Value," then set a Process Builder/Workflow Rule that copies the prior value of the field to this second text field when the field changes. As a workflow example: "Evaluate when the following formula is true: ISCHANGED(FieldName)" with a workflow field update "Previous Field Value set to formula PRIORVALUE(FieldName).






          share|improve this answer






















          • Exactly what I was looking for. Thanks, Sir.
            – tDactyl
            1 hour ago










          • @tDactyl You're welcome. Always glad to help.
            – sfdcfox
            1 hour ago












          up vote
          3
          down vote










          up vote
          3
          down vote









          No, there is no formula for this; formula functions like ISCHANGED and PRIORVALUE only work in the context when a field value is transitioning from one value to another (i.e. during a DML update). Old values are not stored in the database (other than field history, which can't be used in a formula anyways).



          The best you could do is create a text field called something like "Field Previous Value," then set a Process Builder/Workflow Rule that copies the prior value of the field to this second text field when the field changes. As a workflow example: "Evaluate when the following formula is true: ISCHANGED(FieldName)" with a workflow field update "Previous Field Value set to formula PRIORVALUE(FieldName).






          share|improve this answer














          No, there is no formula for this; formula functions like ISCHANGED and PRIORVALUE only work in the context when a field value is transitioning from one value to another (i.e. during a DML update). Old values are not stored in the database (other than field history, which can't be used in a formula anyways).



          The best you could do is create a text field called something like "Field Previous Value," then set a Process Builder/Workflow Rule that copies the prior value of the field to this second text field when the field changes. As a workflow example: "Evaluate when the following formula is true: ISCHANGED(FieldName)" with a workflow field update "Previous Field Value set to formula PRIORVALUE(FieldName).







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 1 hour ago

























          answered 1 hour ago









          sfdcfox

          237k10181398




          237k10181398











          • Exactly what I was looking for. Thanks, Sir.
            – tDactyl
            1 hour ago










          • @tDactyl You're welcome. Always glad to help.
            – sfdcfox
            1 hour ago
















          • Exactly what I was looking for. Thanks, Sir.
            – tDactyl
            1 hour ago










          • @tDactyl You're welcome. Always glad to help.
            – sfdcfox
            1 hour ago















          Exactly what I was looking for. Thanks, Sir.
          – tDactyl
          1 hour ago




          Exactly what I was looking for. Thanks, Sir.
          – tDactyl
          1 hour ago












          @tDactyl You're welcome. Always glad to help.
          – sfdcfox
          1 hour ago




          @tDactyl You're welcome. Always glad to help.
          – sfdcfox
          1 hour ago

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f238524%2fcreate-a-formula-text-field-to-display-prior-value-or-text-field%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          Long meetings (6-7 hours a day): Being “babysat” by supervisor

          Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

          Confectionery