Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
wynnjimbbt
Contributor III
Contributor III

What does this script do?

SET AltString=

   if(NOT IsNull($1), $1,

      if(NOT IsNull($2), $2,

          if(NOT IsNull($3), $3,

             if(NOT IsNull($4), $4,

                if(NOT IsNull($5), $5,

                  if(NOT IsNull($6), $6,

                      if(NOT IsNull($7), $7,

                         if(NOT IsNull($8), $8,

                           if(NOT IsNull($9), $9, '')

)

)

)

)

)

)

)

);

 

/*********************************************************************************************

1 Reply
swuehl
MVP
MVP

I guess it should do similar like Alt() does for numeric values, i.e. return the first not null argument (also for text values)

Use it like this (with up to 9 arguments, but you can use less)

=$(AltString( argument1, argument2, argument3, ...., argument9))

edit: you need to use a dollar sign expansion

Added this link

Dollar-sign expansion using parameters ‒ QlikView

argument1 to argument9 can be a numeric or text value or NULL

edit2: for example

=$(AltString(Null(), vVariableNotExist,'Text2'))

in a text box will return Text2 value