Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sjhussain
Partner - Creator II
Partner - Creator II

Qlikview - Tracking System using macros

Dear All,

We are currently implementing a QV mapping application to track vehicles.  The mapping service we are using is by Idevio.

The customer has provided us with webservice in which we enter the device number and it returns lat/long.

The way we approached it is as follows:

* Dynamic Table – Containing Device IMEI no., Lat/Long which is to be used by Idevio Maps

* Listbox containing the Device Numbers which are to be selected and mapped

* Two buttons calling Macro subroutines - TrackOn and TrackOff

TrackOn Marco Subroutine

  • Loop Every 30 second
  • Loop For Each device
    • send the IMEI number to the webservice
    • receive the lat/long
    • Dynamic Insert/Update
      • DynamicUpdateCommand – first to insert the IMEI Devices and then for each iteration it updates the Table
    • Idevio Maps is using the Dynamic Table so it updates the Lat/Long and display the new coordinate

TrackOff Macro Subroutine

  • Delete the Table
  • Boolean to Turnoff the Tracking

mapping.jpg

We are able to properly receive Lat/Long from the Webservice and populate the Dynamic Table but the problem is that we have to do it every 30 seconds.

I have put a Sleep 30 second delay between each group of devices after it receives the lat/long.  During the Sleep Time the application gets stuck and is non-responsive.

Since the processing is too fast and the sleep is part of the process it is not refreshing the Dynamic Table and even the Dynamic Table is getting stuck.  Also the Macro is not working on the Server Side.  I have checked all the required boxes for enabling macros on the document as well as server side.

One option I was thinking is that have a DB Table of all the devices and then keep on updating them at every 30 seconds and then reload the QV Application.  This way the mapping table can just reload the data rather than being dynamic?  The problem here is again I have to put in a delay of 30 seconds.  The delay pauses the application as it is part of the macro.

I am hoping that someone on the community has worked on an application like this and can share their experiences.

Thanks in advance.

0 Replies