You need to sign in to do that
Don't have an account?
Administrator 167
Write a IF formula (>1) then display image + text
Hello,
I would want to write a formula that uses a number from a roll-up summary field.
If this number > 1, then it should display an image AND display the number. If this number = 1, it should display another image and display "0".
I tried to mix a lot of possibilities from the formula below but did not found my way.
Help would be appreciated
IF(Linked_Servers__c > 1 , IMAGE("/img/samples/light_green.gif")+Linked_Servers__c)
IF(Linked_Servers__c = 1 , IMAGE("/img/samples/light_green.gif")+"0")
I would want to write a formula that uses a number from a roll-up summary field.
If this number > 1, then it should display an image AND display the number. If this number = 1, it should display another image and display "0".
I tried to mix a lot of possibilities from the formula below but did not found my way.
Help would be appreciated
IF(Linked_Servers__c > 1 , IMAGE("/img/samples/light_green.gif")+Linked_Servers__c)
IF(Linked_Servers__c = 1 , IMAGE("/img/samples/light_green.gif")+"0")
Have you tried checking conditional rendering as your scenario seems to the one that could use it, below if the link to the help article I found that explains how to make use of conditional rendering in visualforce page I hope you find the below article useful:
>> https://help.salesforce.com/articleView?id=000324662&type=1&mode=1
In case if this comes handy can you please choose this as best answer so that it can be used by others in the future.
Regards,
Anutej
I finally succeeded in this using formulas (containing images+value) included in formulas.
I finally succeeded in this using formulas in Object A :
1) formula field 1 using roll-up summary of Object B
2) formula field 2 with "formula 1 - 1" (my specific need)
3) formula field 3 with image (green light) + formula field 2
4) formula field 4 with image (red light) + "0"
5) Formula field 5 with
IF(
formula field 2 >= 1,
formula field 3,
formula field 4
)