Beruflich Dokumente
Kultur Dokumente
Color can help highlight important data in your application, calling out
specific information you want the user to pay attention to. For example, if
you have values that need special attention in a table of data, you might
want to highlight them with a different color. Formatting an individual field
is quite trivial, but when trying to do this for rows in a table you might
need a bit of help. Here is the recipe:
https://blogs.oracle.com/vbcs/conditional-formatting-row-values-in-a-table-in-visual-builder 1/5
9/2/2019 Conditional Formatting Row Values in a Table in Visual Builder | Oracle Visual Builder Cloud Service Blog
1 PageModule.prototype.color = function(salary){
2 if (salary > 2000) {
3 return "red";
4 }
5 return "blue";
6 }
7
Then in your table, you'll want to have the specific field represented as a
separate column template, which will then let you define the format for
this field. To get this - drag and drop a Text component onto the existing
field (see this "table tips" blog for a video about this approach). You'll then
surround the field with a span component that you will format like this:
1
https://blogs.oracle.com/vbcs/conditional-formatting-row-values-in-a-table-in-visual-builder 2/5
9/2/2019 Conditional Formatting Row Values in a Table in Visual Builder | Oracle Visual Builder Cloud Service Blog
2 <template slot="Salary">
3 <span :style.color="{{$page.functions.color($current.data)}}">
4 <oj-bind-text value="[[$current.data]]">
5 </oj-bind-text>
6 </span>
</template>
Comments ( 4 )
Recent Content
Site Map Legal Notices Terms of Use Privacy Cookie Preferences Ad Choices
https://blogs.oracle.com/vbcs/conditional-formatting-row-values-in-a-table-in-visual-builder 4/5
9/2/2019 Conditional Formatting Row Values in a Table in Visual Builder | Oracle Visual Builder Cloud Service Blog
https://blogs.oracle.com/vbcs/conditional-formatting-row-values-in-a-table-in-visual-builder 5/5