Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to update a field after load

Hi all,

After loading a large table, I will need to select an individual record by "TRANS_NUMBER" and update "status" column with text. How do I do that? The transaction_number column values are alphanumeric.  And is there a way to select multiple records by TRANS_NUMBER and updating them all with the same status?

For example:

TRANS_NUMBERStatus
1347Needs Action

I would like to change the Status of TRANS_NUMBER 1347 from Needs Action to Approved.

Thanks in advance for your help!

1 Solution

Accepted Solutions
MVP
MVP

Ok, just create variables for the set of Transaction numbers and the value to change to, then the statement could look like:

UPDATE Trans SET Value= vValue WHERE match(TransNumber,$(vTrans));

View solution in original post

10 Replies
MVP
MVP

You can use Dynamic Update to update your field values on the server, but these changes will not persist or promote to the source DB.

If that's what you want, enable Dynamic update, then create a button with External - Dynamic Update action and a statement like

UPDATE TransactionTable SET status='Approved' WHERE TRANS_NUMBER=1347;

Not applicable

Create the Mapping table and create the new field or change the value on the existing field while loading the data into qlikview..

Not applicable

Swuehl,

The TRANS_NUMBER wont always be 1347.  The TRANS_NUMBER will depend on what I select and there may be multiple TRANS_NUMBER selected at once.  Please advise.

Not applicable

Dathu_qv,

I will need to load the script first and view the table before making changes.  Does a mapping table still work for this?

Not applicable

Absolutely it works...

Temp:

LOAD * FROM SourceTable ;

MAP_TAB:

Mapping LOAD KEY, VALUE From source ;

MAIN:

LOAD *, ApplyMap('MAP_TAB',KEYFIELD,KEYFIELD) AS NEWFILED

Resident Temp;

DROP Table Temp;

Please post some sample data if you need full script....

MVP
MVP

Ok, just create variables for the set of Transaction numbers and the value to change to, then the statement could look like:

UPDATE Trans SET Value= vValue WHERE match(TransNumber,$(vTrans));

View solution in original post

Not applicable

that did the job thanks swuehl!!!

Partner
Partner

I have tried your example app, I am using v11.2 SR5 and upgraded to SR7, but it doesn't appear to work in either. What version are you using?

Not applicable

It's not working for me too, I am using SR7.