Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to hard code a value for a field

Hi

is it possible to hard code a value based on a field weather the field is null or has some text in it?

I can see that you can do it like an if statement which works fine for example

if(Upper(CUST_REF) like 'BID*','Bidding',if(Upper(CUST_REF) like 'OTP*' or Upper(CUST_REF)='ORDER TO PLACE','Order to Place','Budget')) as [Q Type],

but i want to hard code CUST_REF weather if meets a criteria or not.

thanks

6 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Script or User Interface?

vishsaggi
Champion III
Champion III

Can you provide what values are coming in your CUST_REF and what value you want to hard code based on what condition?

pradosh_thakur
Master II
Master II

If(len(trim(CUST_REF)) > 0, 'hardcode value 1', hardcode value 2')

Learning never stops.
ger_alegria
Partner - Creator
Partner - Creator

if(isnull(CUST_REF),0,1) as HardCodeField

m_perreault
Creator III
Creator III

**

If(len(trim(CUST_REF)) > 0, 'hardcode value 1', hardcode value 2')

qlikviewwizard
Master II
Master II

Hi,

Use this code.

if(WildMatch(CUST_REF,'BOST*'),'Bidding',

    if(WildMatch(CUST_REF,'OTP*','ORDER TO PLACE'),'Order to Place','Budget')) as [Q Type],

Capture.JPG