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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to check the first three position in a input data are alpha or numeric

I need to check some condition to satisfy before inserting a data into target.
- First three position in a input should be alpha or numeric & if it is alpha should be uppercase.
-the first letter can be alpha or a special character '.'
Labels (2)
2 Replies
Anonymous
Not applicable
Author

Hi,

Could you please elaborate your case with an example with input and expected output values?

Best regards

Sabrina

TRF
Champion II
Champion II

Hi, 

You need a regex in such a case.

Suppose you have the following data flow (here in a tFixedFlowInput):

0683p000009Ltd1.png

Connect the tFixedFlowInput with a tMap and configure it as:0683p000009LuCs.png

 

 

 

 

 

The tMap contains 2 output flows called "accepted" and "rejected" (see "Catch out rejected" option for the 2nd flow).

A filter is set for the "accepted" flow using the following regex:

row1.value.matches("^\\..*") || row1.value.matches("^[0-9|A-Z]{3}.*")

This filter accept 2 kind of rows:

- rows starting with a "." followed by any sequence of characters

- rows starting by a sequence of 3 characters composed by digits (0-9) or uppercase letters (A-Z) followed by any sequence of characters

 

And the result is:

0683p000009Ltvj.png

Hope this is what you expect.