BPM, Workflow, and Case

BPM, Workflow, and Case

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  How to render custom components on Service Data Table

    Posted Mon July 27, 2020 10:07 AM
    Hello,

    I'm using Service Data Table to render my data. One of the columns is a custom coach view that need to receive two option variables (name and url).
    By default, Service Data Table renders all as output text so I changed this column to be rendered as "custom", but when I do it all the content for this column goes blank.

    Is there a way to pass custom data (as options variable) to each column/row using Service Data Table?

    Thanks

    ------------------------------
    Ranieri Mazili
    ------------------------------


  • 2.  RE: How to render custom components on Service Data Table

    Posted Mon July 27, 2020 10:47 AM
    Hi Ranieri, 

    The Service Data Table has an On Custom Cell event that allows you to return an HTML element. You will need to review the cell context variable passed to the event.  For instance, there is cell.index property to determine which column is being operated on to have various custom cell types.  To get the data from the row, use cell.row.data.


    ------------------------------
    Stephen Perez
    ------------------------------



  • 3.  RE: How to render custom components on Service Data Table

    Posted Mon July 27, 2020 02:08 PM
    Ok... so I cannot use coach view inside the columns of Service Data Table... it's sad... I have to return the html to be rendered by that column.
    I will return a html with an anchor tag and I would like to call a function that was written inside Inline Javascript section...
    After declare my function as:

    this.myFunction = function () { alert("teste"); }

    I have tried to set the onclick of my anchor tag to this function but I've received "myFunction is not defined" message.

    Do you know how could I call it?


    ------------------------------
    Ranieri Mazili
    ------------------------------



  • 4.  RE: How to render custom components on Service Data Table

    Posted Mon July 27, 2020 02:19 PM
    If you use "this" inside the scope of the HTML element onclick, the "this" it refers to becomes the onclick event.  Try defining var _this = this; outside the scope of the onclick callback.  Then call _this.myFunction() in the onclick.

    ------------------------------
    Stephen Perez
    ------------------------------