Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Inputfield messing the actual field

Hi!

I am adding command " '0' as [Change of HS date]" to my script to create a inputfield. But when I add the " Inputfield [Change of HS date];" on top of the table where I load data the field values turn into random numbers!

Capture.PNG

Any idea why this happens and how to fix it? Thanks!

Regards, Heidi

25 Replies
Not applicable
Author

I tried to look for differences but didn't see one. When I add the parts to unmodified script it works fine. Have to get back to this on monday morning! Thanks for your help and if someone figures out what might cause these problems with the inputfield please share!(:

Have a nice weekend!

Reg,

Heidi

patroser
Partner
Partner

Hi there!

Not sure if you've already found a solution, but I think I've found the problem.

I'm facing a similar issue with my input field.

First I thought those numbers are random numbers, but after sorting the input field I saw that these numbers where just counting form 0 to NoOfRows.

Thats where I found this post.

I tried to reproduce the problem in a sample application.

INPUTFIELD Input;

Table1:

LOAD

  RowNo() as keyRow,

  RowNo() as Value,

  0 as Input

AutoGenerate 1 while RowNo() < 1000;

//Left Join (Table1)

//LOAD

// RowNo() as keyRow,

// 0 as FormerInput

//AutoGenerate 1 while RowNo() < 1000;

Left Join (Table1)

LOAD

  RowNo() as keyRow,

  0 as FormerInput

Resident Table1;

So I think I found the problem. This misbehaviour appears when you Join Fields to the table holdin the input field resident from this table.
In my example I first tried to Join 0 as FormerInput from another table, everything worked just fine.

But by switching and joining 0 as FormerInput Resident the table I am joining to (and where my input field is), the input field is filled with numbers counting from 0 to NoOfRows.

In your example I think the preceding load triggers similar to my join resident the same table.

I hope this helps anyone.

Best regards, Patrick

(I tried to format the code like in script but couldn't find a option for this, sorry if it isn't that readable)

iliyansomlev
Partner
Partner

Hi, I can confirm that what Patrick Roser wrote is correct.

We also got consecutive values in our inputfiled "OurInputField "when it was defined  as /0 as OurInputField/ in our Table1.

The reason was that the table where this inputfield was defined, was later in the script used in joins, like

/join (Table1) load Something from Table2/.

You can check these articles as well: Qlik Support and Qlik Support

They are not very detailed and in case you cannot access them, the second article states that input field functionality is disabled in the moment of resident loads and joins. In our case we had our field filled with numbers which are probably the consecutive numbers kept in memory for each inputfield cell, that were disabled during the join operation and somehow still kept in the memory as the cell values and that is why the inputfield got filled in the end with them.

If you want your field to work as inputfield and have 0 as initial value in each of its cell, you should define it in the last place where you call or load the table you put this field into. This is how we solved our issue.

andrespa
Specialist
Specialist

Thanks Iliyan, it's exactly as you says. It worked for me.

Cheers,

Andrés

adamjiawen
Contributor II
Contributor II

Hi HeidiKor,

Did you solve this issue?Or It's still pending?If you have any idea why this happened please let me know, because I'm also coming across similar issue.

Thanks a lot,

Shen Doge

patroser
Partner
Partner

The challenge here is that the input field has an internal key which consists of all previously loaded fields (if I remember correctly).
Thus adding another field after the input field, this key isn't unique any longer. Therefore, the input field will be filled with consecutive numbers.

Guaranteeing that the input field is the last field added to the table will solve your problem.

Best regards,

Patrick