Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to have something in the script like the below -
IF len (product) < 0 and isnull(product) then costprice else saleprice
any suggestions
IF len (product) < 0 and isnull(product) then costprice else saleprice as PRODUCT PRICE
Hi,
try like
if(len(trim(product))=0,costprice,saleprice)
In this case you dont required to test isnull()
Regards,
Prashant
len(product) < 0 ????
Can you give example of this case???
Regards,
May be this?
If(Len(Product) = 0, If(IsNull(Prodcut), Sum(costprice), Sum(saleprice)))
MEXAMPLE -- MY PRODUCT data goes something like this MFELKAB etc..
so in many cases my source is blank or null. So i need to check both conditions i.e product shows as blank or - (null)
Hi,
- does not indicate null.
You can write like
If(len(trim(fieldName))=0 or trim(fieldName)="-",costPrice,SalesPrice)
Regards,
all the above is only working for len .. for null part it is not working i tried both isnull and trim(product) = '-'
Will you provide few rows related the combination of data and better if you provide expected result
Hi,
If there is space in field then isnull() wont work.
So you have to use len(trim(product))=0
If this wont help you then provide some sample data or share your screen shot of what you tried.
Regards,