Hi Ragic community,
I’m trying to customize the appearance of a specific subtable entry in my Ragic sheet. I want to change the value color of a particular field in the subtable based on certain conditions.
Could someone please provide a JavaScript code snippet or guide me on how to achieve this? Specifically, I’d like to know:
- How to target a specific subtable entry
- How to change the value color of a particular field in that entry
Any help or guidance would be greatly appreciated. Thank you!
Conditional formatting usually suffices.
In the design mode (of the form view) of the table you want, click Form Tools > Conditional Formatting. Click New Rule to create a condition, and a desired format.
Targeting a subtable entry would be a rule like “if a subtable field (say 1001000) satisfies a condition (so you probably want ‘is’, ‘is equal to’ or ‘is on’), then do something (‘set background color/set value color’)”.
Let’s say there are subtable fields called Item No. and Product Name, and the values should be red if Item No. is equal to 5. In this case, the rule would be “if (Item No.) (is equal to) (5), (Set value color) (Item No., Product Name) (red)”.
I hope you find this sufficient for your purposes. If you have something more specific in mind, please feel free to ask.