Display Calculated field

Home Forums General discussion Display Calculated field

Viewing 1 reply thread
  • Author
    Posts
    • #31527
      First Eagle
      Participant

        Hello Alexander,

        please how can i display calculated on the DFFS Form ?

        Best regards

      • #31542
        Alexander Bautz
        Keymaster

          I guess you are referring to EditForm as calculated columns are available in DispForm by default. To do this you must add this to your Custom JS:

          var res = spjs.utility.getItemByID({
              "listName": _spPageContextInfo.pageListId,
              "id": spjs.dffs.data.thisItemID,
              "viewFields": ["ID", "YourCalculatedColumn"]
          });
          var yourCalcFieldValue = res.YourCalculatedColumn.split(";#")[1];

          Then add a table row to your tab and use this in the Row body textarea:

          {{var:yourCalcFieldValue}}

          Replace YourCalculatedColumn with the internal name of our calculated field.

          Alexander

      Viewing 1 reply thread
      • You must be logged in to reply to this topic.