Jump to content
Salesforce and other SMB Solutions are coming soon. ×

If statement


kbren
 Share

Recommended Posts

i have an the if statement shown below in a script. i use it to compare the values in different fields and based on these results returns true(1) or false(0). the if statement works fine if i'm only comparing one field when i put in the OR it does'nt work i can't see why not. i've also tried a case statement but still no joy. any suggestions??

 

If((field1=tempfield1) or (field2= tempfield2),0,1)

Link to comment
Share on other sites

What do you mean?

It gives you the"wrong" result?

If so try

If((field1=tempfield1) or (field2= tempfield2),1,0)

However you don't need if statement

field1=tempfield1 or field2= tempfield2

will work just fine

 

HTH

 

Dj

Link to comment
Share on other sites

Dj,

sorry it's not that it gives the wrong result but it does not evalulate properly the. i need to get true or false result depending on the values in the filed. if the the values are equal i return 0 to exit and 1 if they are not. the problem i having is when have

If((field1=tempfield1)0,1)

it works fine but if i have

If((field1=tempfield1) or (field2= tempfield2),0,1)

it does not evalulate.

Link to comment
Share on other sites

no, the temp field are global field which hold the value contain in field. when i exit a form i compare these fields to see if message box is displayed as users to save changes.

Link to comment
Share on other sites

Sorry, after re-reading.

Did you say script step?

If so than the step should look like this

 

other script steps

if["field1=tempfield1 or field2= tempfield2"]

do what you have to do

else

do something else

end if

more script steps

 

Have to go now

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use