Simplicty and flexibility!

If () Statement

Started by Handles
You will need to Sign In to be able to add or comment on the forum!

If () Statement

Can any one let me know how many “if ()” statements you can have in a derivation formula ?

I have been trying to get below working and think I may be missing something.

if( ProductCode = blank , "PNL.tif" ,  if(ProductCode not = any rFM_Link ProductCode, "PEVC.tif", if( ProductCode = "Special.******" , "special.tif" , concat( ProductCode , ".tif"))))


Whats Working !

if( ProductCode = blank , "PNL.tif" (WORKS)

if(ProductCode not = any rFM_Link ProductCode, "PEVC.tif" (WORKS)

if( ProductCode = "Special.******" , "special.tif" , concat( ProductCode , ".tif" (NOT WORKING)  

Written by Handles 28/02/22 at 10:17:51 LegEasy 6 Windows

Re:If () Statement

it's not the number of if() statements which is the problem but the length of the derivation. In 6.x it is only 255 characters. In DE8 it is 4096.

Written by DataEase 01/03/22 at 12:06:51 LegEasy 6 Windows

Re:Re:If () Statement

Thanks for your reply, I see what you mean, but on counting the carectors including spaces I make it 184 Number used, so should be within the 255 number, or am I missing the point ?

Written by Handles 01/03/22 at 14:56:27 LegEasy 6 Windows

Re:If () Statement

Sorry, but is this a derivation in a field?

You can't use "any rFM_Link ProductCode".

In derivations you need to use Lookup.

Written by DataEase 02/03/22 at 13:28:07 LegEasy 6 Windows

Re:Re:If () Statement

Download: CaptureDATAEASE.PNG

Perfect thank you, "Lookup" makes the form work now as expected. 

I have another problem popped up, luckely I backed up before it occurred, "Access Violation" on one form  Please see attached, before I restore is there any way of overcomming the error ?      

Written by Handles 02/03/22 at 17:56:38 LegEasy 6 Windows