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: 
Not applicable

Cannot display textbox using show option in layout

Hello All,

I want to display the message 'Missing Data' in a texbox ONLY when the value of the current week Inventory Coverage is null. Otherwise the texbox should be hidden in the page.

I have used an expression like this to return me the value of IC for a given country:

v_Expression_ICH_Spain_Current_Week

Can you please help me out and tell me how to do it?

8 Replies
phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

Go to Properties --> Layout --> conditional Show..

Enter

len(v_Expression_ICH_Spain_Current_Week) = 0

If it is a variable use Len($(v_Expression_ICH_Spain_Current_Week)) = 0

Not applicable
Author

Hi,

It doesn't work:-(

I tried using Isnull($v_Expression_ICH_Spain_Current_Week) in the conditional show but this doesn't work as well.

My textbox still appears.

Can you help?

Not applicable
Author

So (assuming this is a varialbe) if you just create a Text box (to debug this) and enter the following:

=$(v_Expression_ICH_Spain_Current_Week)

... then what is the value displayed?

Is the value Null as you expect (so it can be used as a reliable trigger for the conditional show)?

Not applicable
Author

Yes, it returns me null. I used null mostly because I have other variables that return me 0. In my case I have to display the texbox only when the variable is null.

Not applicable
Author

If that is a variable and it's properly evaulating to Null, then indeed it should work if you open Properties for the Text Object, then on the Layout tab, in the Show box, select Conditional, and enter:

IsNull($(v_Expression_ICH_Spain_Current_Week))


Not applicable
Author

Ok. I have made a test and I assume that it is displaying me the textbox when the value is null. But I have used another texbox to test when the value is not null and the new texbox still appears when the condition is false.

E.g. I used another variable where I know that the value is not null.

IsNull($(v_Expression_ICH_Reunion_Current_Week)

The texbox should dissapear if I use this condition in the 'Conditional Show' I suppose. But this is not the case. the textbox still appear.

Is there a means that I can be sure the condition is working good?

Not applicable
Author

What is the value of v_Expression_ICH_Spain_Current_Week?

Is this an expression, or is it just a value (i.e., a string, number, or null)?

If it's just a value, the the issue is the dollar sign expansion.

Let's try this for your condition:

Len('$(v_Expression_ICH_Spain_Current_Week)')=0

Note that this will return true with either a Null or an empty string value.

Or for JUST a Null, try this:

IsNull(v_Expression_ICH_Spain_Current_Week)

See attached.

Not applicable
Author

It's an expression. The value of v_Expression_ICH_Spain_Current_Week is null, i.e, on the texbox I get '-' when I put =$(v_Expression_ICH_Spain_Current_Week)

The condition len($(v_Expression_ICH_Spain_Current_Week)) works fine as it returns me 0 which means that the value is null.

I have created a new qvw and tested a few conditions on texboxes using conditional option. Strangely, the conditions work fine on the new qvw. I think that there is a problem with my existing qvw. But I dont know what is causing my application not to consider those conditions in my texbox.

Perhaps macros.

I'll need to check. But the option you advised works.

Thx.