Learn about Redwood and be one of the first to join the conversation

Visit Redwood Community
Conditional Formatting Row Values — Cloud Customer Connect
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

Received Response
11
Views
4
Comments
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!