Set Field – Number field – do calculation

Forums Dynamic Forms for SharePoint Set Field – Number field – do calculation

Tagged: 

Viewing 2 reply threads
  • Author
    Posts
    • #16158
      Sergio Giusti
      Participant

      Hi Alex

      I would like to have a rule that is triggering a number field being set to a new value, i.e.

      if X = Yes then set field {Y} to {Y} + 1

      can I do this? if so, how?

      Thanks

    • #16194
      Alexander Bautz
      Keymaster

      Hi,
      I’ll add this to the setfield functionality in the next release (with a “sum:” prefix), but in the meantime you must use a custom function like this:

      function customCalc(){
          var a = getFieldValue("YOUR_SOURCE_FIELD_NAME");
          var b = parseFloat(a) + 1;
          setFieldValue("YOUR_TARGET_FIELD_NAME",b);
      }

      Alexander

    • #16198
      Sergio Giusti
      Participant

      Thank you

Viewing 2 reply threads
  • You must be logged in to reply to this topic.