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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

scripting in inputfield

Hi all!

I'm already know that there is no way to update an inputfield from sql after I changed the values in it.

So now...

I've got a table box and two columns in it, with one of them as an inputfield (Column1)

The second column loads data from an SQL server, which updates daily (Column2).

I want to update data in Column1 with new (freshly updated) data in Column2 on ButtonClick Event, or Reload All script for futher what-if analysis.

It there a way to do that?

Thank you very much.

4 Replies
brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

if you want to show the further entered data, save them by an export and reload them.

Not applicable
Author

No this is not what I need.

I'll try to explain my task better.

First I have a table box with three columns GoodName, MarketPrice and MyPrice (this as inputfield). Initially both of MarketPrice and MyPrice fields load data from the same field from SQL DB, so they have the same value.

Then here is the 6-columns straight table - GoodName, Qty, MarketPrice, MarketValue, MyPrice, MyValue

GoodName, Qty and MarketPrice loads data from SQL, MarketValue is Qty*MarketPrice, MyPrice is coming from table box, MyValue is Qty*MyPrice.

I modify data in MyPrice column of tablebox and see the difference between the MarketValue and MyValue in straight table.

But the MarketPrice on SQL server updates daily. When I reload all data in my project next day the new data loads in MarketPrice, this is ok. But the data in MyPrice column doesn't update 'cause it is an inputfield as I think.

I want to update the data in MyPrice with current data in MarketPrice.

Is it possible?

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi, John,

you have to enter in your script :

Table:
Load ...,
MarketPrice,
MarketPrice as MyPrice,
...;
SQL * From ...;

so you set the MarketPrice as the default to you Inputfield MyPrice. But now you lost all futher entered data, that's why I suggest to save them.

Not applicable
Author

I'll try that, thank you.

Also I've found the macro variant: activedocument.fields(<fieldname>).ResetInputFieldValues 0