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

Show mismatch names in a text box

Hi All,


Good day!!.

   

I have a scenario and need your help on this. In my application, I just kept a input field to get the user inputs. Later, I'll do some calculation based on the inputs. I have a set of pre-defined names and the user should enter only these names ie. names are Material, Product, Prefix, SO and WG.


I have to display a message for the below cases.

* Invalid names entered other than the defined names (Eg Materials, PID's or AAAAA)

* Contains any blank cells

I don't want to message for the below cases,

* Same level updated by user multiple times

* Same input levels updated for all the cells with a valid name


Capture.PNG


Attached a sample file. Any help would be greatly appreciated.


P.S: It would be nice (If possible), if i can show the mismatch names also in another text box.

Thank you.

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi Tamil,

Try this:

='Mismatch Values: '&Concat(Aggr(If(SubstringCount(Concat(TOTAL {1} DISTINCT Upper(Level),'|'),Upper(InputLevel))=0,Upper(InputLevel)),InputLevel),'|')

'Match Values: '&Concat(Aggr(If(SubstringCount(Concat(TOTAL {1} DISTINCT Upper(Level),'|'),Upper(InputLevel))>0,Upper(InputLevel)),InputLevel),'|')

Regards

View solution in original post

13 Replies
Kushal_Chawda

If any values other then predefined values then you need pop msg that"Wrong value input", is that what you want?

Anonymous
Not applicable

Hi Tamil

Try this expressions for mismatch and match values:

'Mismatch Values: '&Concat(Aggr(If(SubstringCount(Concat(DISTINCT Upper(Level),'|'), Upper(InputLevel))=0, Upper(InputLevel)), InputLevel),'|')

'Match Values: '&Concat(Aggr(If(SubstringCount(Concat(DISTINCT  Upper(Level),'|'), Upper(InputLevel))>0, Upper(InputLevel)), InputLevel),'|')

Regards

tamilarasu
Champion
Champion
Author

Exactly.

Kushal_Chawda

Have you tried or search for any macro? Idea would be store input field values in variable and read the variable with macro and compare with pre define  values, if not matched then show msgbox

tamilarasu
Champion
Champion
Author

Yes. That was my final option. I am expecting some front end solution.

tamilarasu
Champion
Champion
Author

Manuel,

Sorry for the late reply. When I entered the defined names like below, it is showing as "Mismatch". I will try to modify your expression.

Capture.PNG

tamilarasu
Champion
Champion
Author

Thank you both for your help. I am not going to publish this dashboard on access point so I will go for macro in this case.

Anonymous
Not applicable

Hi Tamil,

Try this:

='Mismatch Values: '&Concat(Aggr(If(SubstringCount(Concat(TOTAL {1} DISTINCT Upper(Level),'|'),Upper(InputLevel))=0,Upper(InputLevel)),InputLevel),'|')

'Match Values: '&Concat(Aggr(If(SubstringCount(Concat(TOTAL {1} DISTINCT Upper(Level),'|'),Upper(InputLevel))>0,Upper(InputLevel)),InputLevel),'|')

Regards

Kushal_Chawda

I think you need here button to run the macro after user inputs the value. Correct me if I am wrong