Hello,
When setting a border with a formula/binding, what are the parameters that are needed/how do I set it?
Also, is there documentation somewhere that I would have been able to figure this out on my own? Like a document showing all of the variables/inputs/etc?
1 Like
Joyce
April 8, 2022, 4:18pm
2
There is documentation here but it’s a work in progress and you wouldn’t have found this there Will add it now!
For this specific use case, any of these will work:
"3px solid red"
"double"
"4px dotted #7e3c7e"
What’s important is that you pass a string with a recognizable CSS value for the border
property as you would here :
Does that help?
1 Like
Thanks Joyce, you rock!
Yes, I was trying it with something like {style:solid, width:1px, color: #33333 }. Wasnt working
Riisud
September 17, 2022, 10:24am
4
Can you also use a variable from your database to make border color change on value from record?
Riisud
September 17, 2022, 10:26am
5
Nevermind found how you can do it.
Thank you. Is it possible to put a color from the colors set up in the design system?
They are available for binding on the explorer if needed
miang
May 25, 2023, 10:54am
8
Hi, can you please explain how to change the color of the border based on the value of a record? I think that @Riisud found the solution but didn’t share it here. Thank you!
Do you want to use a colour from your design system or hard coded one?
miang
May 31, 2023, 12:33pm
10
hard coded one would be fine Thank you
Then you just need to bind to border property, and return a valid css synthax string
Example: “solid 1px #121212 ”
Vi56
October 26, 2023, 2:22pm
12
Hello,
So @aurelie what is the way to set borders with a formula?
Here is what I get when adding a “if” formula for my border color in the CSS syntax string, to change depending on a variable:
Thanks
aurelie
October 26, 2023, 3:27pm
13
You should concatenate both string
concatenate("1px solid ", if(MY_COND, COLOR_1, COLOR_2))
The preview value should show you something like “1px solid #1E3A8A ”
1 Like