+ Start a Discussion
cbrocbro 

display 'no' if checkbox is false (otherwise display 'yes' if checkbox is true)

So here is what I have, but the problem is that it is always displaying as 'no' - whether checkbox is true or false.

 

Can anyone help me to fix this?

 

Thanks,
Chris

 

IF(Contract_Line__r.Synced_with_RMB__c <> False, 'yes', 'no')

 

Shannon HaleShannon Hale

You shouldn't need the "<> False" part:

 

IF( 
  Contract_Line__r.Synced_with_RMB__c,
  'yes',
  'no'
)

 

cbrocbro

sorry for the late reply.  That doesn't seem to be working, either.  It just says 'no' - no matter what that checkbox says. 

 

I should mention that this is a formula field, not a workflow... Do I need to build a workflow or a trigger instead?

 

any ideas?

 

Thanks,
Chris

Shannon HaleShannon Hale

It shouldn't require a workflow or trigger, no.

 

You've verified that the checkbox you're looking at is the same one you're referencing in the formula (Synced_with_RMB__c)?

 

You've verified that the record you're testing with has a value set in the lookup field for Contract Line? Because if it has no record to get the checkbox value from that would cause it to return false.

 

Can you create a second checkbox on your Contract Line object and try that in the formula and see if that one works? Sorry, I'm short on ideas here.

cbrocbro

Yes.  All is verified.  

 

I tried two new fields and with the same formula.   it defaults to 'no' no matter what.

 

I also tried to change the order of 'no' and 'yes' - and when i do that, it just defaults to yes, whether the box is checked or not.

 

Like this:

 

IF( 
  Contract_Line__r.Synced_with_RMB__c,
  'no',
  'yes'
)

 

 

I have to be missing something...  it is just defaulting to whatever the last value is...

 

hmmm.