Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Conditional Formatting Row Values

edited Jun 8, 2022 3:55PM in Visual Builder 4 comments

Summary:

Hi Team,

I am trying to format row values. Following the steps mentioned in the blog.

Below is my code, I don't see color change for the values

  ######################

 <template slot="onHandTemplate">

     <span :style="[[$functions.color($current.data)]]">

     <oj-bind-text value="[[$current.data]]">

     </oj-bind-text>

     </span>

    </template>

##################

PageModule.prototype.color = function(onHand){

  if (onHand < 100) {

  return {"background-color":"red"}

  }

 return {"background-color":"green"}

 }

 ###################

  {

    "headerText": "Onhand",

    "field": "QTY_ONHAND",

    "sortable": "disabled",

    "frozenEdge": "start",

    " template": "onHandTemplate"

  }

####################


Content (required):


Version (include the version you are using, if applicable):


Code Snippet (add any code snippets that support your topic, if applicable):

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!