Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
tseebach
Luminary Alumni
Luminary Alumni

Save table to file on server

Hi,

I've found a issue with my budget appllication when used via AJAX. It needs to save the new budget to a file on the server, so another application can read it.

The Action export, works nicely in the Developer, but pipes out a file to the browser in AJAX, instead on the file system.

And this macro does not seem to work in AJAX:

set doc = ActiveDocument
set obj = doc.GetSheetObject("CH416")
obj.ServerSideExport "budget.csv",";"

Any ideas?

5 Replies
martin59
Specialist II
Specialist II

Hello,

I think macros doesn't work with AJAX.

Regards,

Martin.

tseebach
Luminary Alumni
Luminary Alumni
Author

Not true, I use a macro to recalcualte some input fields, that works nicely 🙂

This code works:

Set objRowCount = Doc.Fields("RecId").GetPossibleValues
For r = 0 to objRowCount.Count - 1
' Select a single item
Doc.Fields("RecId").Select objRowCount.Item(r).text
' Get the possible ids

' Calculate the change
strForecast = Round(objvIncrease.GetContent.String * objForecast.Item(r).text)
Doc.Fields("Forecast").SetInputFieldValue objRowCount.Item(r).text-1,Cstr(strForecast)
Doc.Fields("Forecast").Clear
Doc.Fields("RecId").Clear
Next

martin59
Specialist II
Specialist II

Good to know, I had got this information by QlikTech France when i had issues with macros and Ajax.

Martin

tseebach
Luminary Alumni
Luminary Alumni
Author

I would love to have a list of what works in ajax. I know everybody is trying to kill macros, but we need this kind of environment to create exceptional solutions.

martin59
Specialist II
Specialist II

I'm completely agree with you !

And in passing, your web site is very interesting !

Thank you