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

inputfield

Hi,

I have created the inputfield and inicialized it with '0' values.

The problem is that every time I close the model and I turn to open it the field has new values that I never introduced and I have to reload to solve that,

any idea?

Thanks

1 Solution

Accepted Solutions
vgutkovsky
Master II
Master II

Yep, I've seen that one before. Make sure that your declaration of inputfields is the very last thing you do in your script. If you have that field before, then prior to declaring it an inputfield call it a different name. Then alias it at the end. For example, if your field is myfield, then your script can look as follows:

mytable:
LOAD
myfield as myfieldtemp
FROM datasource.qvd (qvd);

Then at the end you can change it to an inputfield:

INPUTFIELD myfield;

myfinaltable:
LOAD
myfieldtemp as myfield
RESIDENT mytable;

Regards,

View solution in original post

3 Replies
vgutkovsky
Master II
Master II

Yep, I've seen that one before. Make sure that your declaration of inputfields is the very last thing you do in your script. If you have that field before, then prior to declaring it an inputfield call it a different name. Then alias it at the end. For example, if your field is myfield, then your script can look as follows:

mytable:
LOAD
myfield as myfieldtemp
FROM datasource.qvd (qvd);

Then at the end you can change it to an inputfield:

INPUTFIELD myfield;

myfinaltable:
LOAD
myfieldtemp as myfield
RESIDENT mytable;

Regards,

Not applicable
Author

Hi Vlad,

I have tried it but it doesn't work propperly, the inputfield turns to 0 but It doesn't allow me to change its values (it becomes a normal field)

Here is the code I have used after your advice I don't know what I'm doing wrong:

left join (TABLE1)load RULE_ID,

0 AS ATEMP

RESIDENT TABLE1;


left join (TABLE1) load RULE_ID,

A AS ATEMP

RESIDENT TABLE1;

inputfield A;

left join (TABLE1)load RULE_ID,

ATEMP AS A

RESIDENT TABLE1;





Not applicable
Author

It works,

I thought I could do it with joins but I was wrong

Thank you Vlad!