Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can any one tell me how to use the Dynamic update action in QV 11 .. Do We need to write macro to use this?
Matthias Dix,
Does this Dynamic Update only pertain to in memory data? I am building something like the budget process where I need to update budget amounts to the source via INPUTFIELD values. The loop would be all changes.
IF ValueChanged THEN
UPDATE BudgetTable SET CurrentBudget = FieldValue(INPUTFIELD) WHERE BudgetTable.RowID = RowID;
END IF
Thanks,
Bob
Hi Matthias Dix,
Is there anyway to set the sql statement "VALUES" by using variables or getFieldSelections()?
What exactly are you trying to do? Did you check my example from this thread here?
I've used both variables and getFieldSelections in combination with Dynamic Update in the past. It seems to be easier to build up an SQL-Statement in makro (using loops etc.) and fire that with:
ActiveDocument.DynamicUpdateCommand (SQL_String)
Keep two things in mind:
Let me know if you need more information. I'd be glad to share my knowledge with the community 🙂
Hi,
Thanks. But I managed to do in this way...please refer to SQL statement below.
INSERT INTO *
(Created_DateTime, Name,Target_Period,Target_Customer_Type,Target_Age_Group,Target_Race,Target_Marital_Status,
Target_Gender,Target_Religion,Target_Line_of_Business,Target_Product_Group,Target_Period_From,Target_Period_To)
VALUES (=$(vCreatedDate), $(vName), $(vPeriod), =$(vCustType), =$(vAgeGroup), =$(vRace), =$(vMaritalStatus), =$(vGender), =$(vReligion), =$(vLOB), =$(vProductGrp), $(vPeriodFrom), $(vPeriodTo))
The VALUES statement is getting the value from qlikview variables
Thanks anyway. 😃
By the way, I had another issue, I would like to export data from a chart to multiple qvd and name the qvd file with current date and time. Any advice?
Sub export
set obj = ActiveDocument.GetSheetObject("CHExport")
File = activedocument.Evaluate("'Output QVD\20130101_Master_Table.qvd'")
obj.ExportEx File, 4
end sub
Refer to the codes in BOLD above, I would like to dynamically name the qvd. Can I put variable in that statement?
regards
Hi CS Khoo,
why are you using = only sometimes in your SQL statement?
What is the Evaluate-Function doing with your filename?
Be aware that there are two possible ways for exporting - at client and at server side.
I solved export with variable filenames like this:
Dim Path
set Path = ActiveDocument.Variables("vRootFolder")
dim Timestamp
Timestamp=ActiveDocument.Evaluate("timestamp(Now(),'YYYYMMDDhhmmss')")
ExportTable.ServerSideExportEx Path.GetContent.String & "02_Datenquellen\DUMMYsave_" & Timestamp & ".xml" ,";", 3 '0=HTML, 1=Text, 2=Bitmap, 3=XML, 4=QVD, 5=BIFF
or
ExportTable.ExportXml Path.GetContent.String & "02_Datenquellen\DUMMYsave_" & Timestamp & ".xml"
Hi Dix! I will post a question about Dynamic Update, in order to put it as Answered when you do (this post would be mark like that!!)
It subject will be "Dynamic Update from InputField". Please, I like you see it!
Matthias!
Thanks for your great examples. I have tried to apply what I can pick up from then, but I end up struggling in vain to make update queries work, at least the way I wish to use them.
I am trying to make a data cleaning tool that updates possible values in a table based on input.
Would be extremely grateful if you could have a look at the attached QVW.
I uploaded my attempt, even if it is far from working... I think such tool, when working, would be a great help for many in the community.
/Christian
Hai Dix,
I am new to Qlikview and to dynamic update as well. I have one question could you please help me solve.
I am using Dynamic Update,
Before I insert the data into the table using insert in want to completely remove all the records and insert the new data.
How do I achieve this?
Hi Matthias,
i didn't find a hint until now so I need to ask you: Do you know a way to trrigger a dynamic update action frrom an object extension?
Thanks a lot in advance,
Martin