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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Save inputfield values when file is Opened in Server

Hi,

I have impletemented input field in one of my tables. I can edit the field and able to save the values when i'm in developer view.

But, when i tried to open the file in server there is no value showing and even if i edit the field, the values are gone when I close the application.

Please help.

Regards,

Skip

4 Replies
Anonymous
Not applicable
Author

use Dynamic update Command...refer in API Guide

Not applicable
Author

Thanks.

Hope someone here can offer simpler and straight procedure on how to do it.

~skip~

martinpohl
Partner - Master
Partner - Master

Here are two macros:

sub export
set temp = ActiveDocument.GetApplication.GetProperties
set table = ActiveDocument.GetSheetObject("CH02")
table.Export "C:\temp\"&"Data"&"_"&replace(temp.Username,"\","")&"_"&right(date,4)&mid(date,4,2)&left(date,2)&left(Time,2)&mid(Time,4,2)&mid(Time,7,2)&".txt" , ";"
msgbox "Export succed"
end sub

sub resetinput
dim x(1)
x(0) = "TB02" 

set fld = ActiveDocument.Fields("WertInput")
fld.ResetInputFieldValues 0, 0

end sub

sub export export all datas from chart02 into a file with Username and Timestamp

When Using a server folder you can read them from all users created by accesspoint

the second macro resets all values in the input tablebox (use only if needed).

Regards

Anonymous
Not applicable
Author

Rem Dynamic Data Update

sub Update

  SET Result = ActiveDocument.DynamicUpdateCommand ("UPDATE * SET Discount = if(Discount >= 35, 0, if (City='Stockholm', Discount + 5, Discount + 2)) WHERE Country = 'SE'")

  if Result = false then

    MsgBox Result.ErrorMessage

  end if 

end sub

sub Insert

  SET Result = ActiveDocument.DynamicUpdateCommand ("INSERT INTO * (Country, City) VALUES (DK, Copenhagen), (NO, Oslo)")

  if Result = false then

    MsgBox Result.ErrorMessage

  end if 

end sub

sub Delete

  SET Result = ActiveDocument.DynamicUpdateCommand ("DELETE FROM CITY WHERE IsNull (Discount)")

  if Result = false then

    MsgBox Result.ErrorMessage

  end if 

end sub

NOTE: Dont use Table name when you update and insert command.. our Datamodeling is same name means it makes relation so it update all tables