Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
saivina2920
Creator
Creator

How to throw alert message to user if the field is blank in qlikview

I have some data is blank. If the data is blank for the particular criteria, then it should throw alert message to user, "this filed has some blank"

example has shown below.

Field has blank.PNG

Field has blank - Gujarat.PNG

when user select EMP_STATE, then if find any blank available in the EMP_RELIEVE_DATE then, it should throw alert message to user "EMP_RELIEVE_DATE has some blank values"

below is my expressions. but, alert not showing...?

=if(IsNull(EMP_RELIEVE_DATE) AND [EMP_STATE]='$(vEmPlaces)','Contains Blank','Not blank')

 

Labels (1)
1 Solution

Accepted Solutions
edwin
Master II
Master II

if you dont want the user to select a state with a blank date maybe you shouldnt even offer that as a possible selection.

look at the attached, i created a straight table that shows only the states where there are no blank dates.  you can format it to look like a list box and the user can click and select from there.

thats another perspective depending on what your business requirements are.  to me pop an alert when the user selects a state with a blank date - sounds like a solution to a problem and may not be the root business requirement

and im saying this not knowing what the business requirements are but pointing out this may require more prodding

View solution in original post

34 Replies
rubenmarin

Hi @saivina2920, this may work: if(Count(EMP_STATE)>Count(EMP_RELIEVE_DATE),'Contains Blank','Not blank')

It can depend on how data model is created but basically it counts how many rows has value in EMP_STATE and checks that the same rows has value on EMP_RELIEVE_DATE.

QFabian
Specialist III
Specialist III

Hi @saivina2920, what if you add this text in green ?

  if( (IsNull(EMP_RELIEVE_DATE) or EMP_RELIEVE_DATE = '') AND [EMP_STATE]='$(vEmPlaces)','Contains Blank','Not blank')

QFabian
saivina2920
Creator
Creator
Author

Yes. perfect.

Is it possible to throw messages to user like "JavaScript Alert popup"..?

QFabian
Specialist III
Specialist III

Hi @saivina2920 , take a look to this menu option 'Alerts'

QFabian_0-1611058910356.png

you can put your expression to be checked

QFabian_3-1611059114503.png

 

 

 

QFabian
saivina2920
Creator
Creator
Author

Thanks for your reply.

I tried above settings. but, alert not throwing.

below screenshot for your reference.

Alert-19JAN2021.PNG

what is the problem...

QFabian
Specialist III
Specialist III

Hi @saivina2920 , you have to check your component formulas in text boxes, to check if the comparison is working with correct numbers.

the first count  / the second count, thats the condition to be evaluated, after an event.

So you have to configure theses parameters

QFabian_0-1611073590917.png

and to check if the condition is acomplished, and the trigger activated, you hace to choose between reload your app or close it and open it again

QFabian
saivina2920
Creator
Creator
Author

I checked thoroughly. it seems to work.

The same will be working in the text objects. 

What could be the problem..?

QFabian
Specialist III
Specialist III

Please check the qvw attached, its a very simple example :

QFabian_0-1611076603310.png

QFabian_1-1611076625158.png

 

QFabian
saivina2920
Creator
Creator
Author

Thanks for your sample file.

I have enclosed my  test qvw file for your reference.

Note : when user selects EMP_STATE then it should throw the error.