Is it possible to have complete navigation screen refresh when a button is pressed? ie. END WP
I set POS & Workperiod buttons to refresh every 2 seconds but it doesn’t look right.
I’ve been fiddeling around and made a Dynamic Tile for Exchange rates and i thought i would share the progress.
It uses the free API of fixer.io. Fixer.io is a free JSON API for current and historical foreign exchange rates published by the European Central Bank.
The rates are updated daily around 3PM CET.
function exchangerates()
{
var nL = '<linebreak/>';
var base = 'EUR'
var symbol1 = 'RON'
var symbol2 = 'GBP'
var symbol3 = 'HUF'
var u = 'http://api.fixer.io/latest?base='+base+'&symbols='+symbol1+','+symbol2+','+symbol3+'';
var getrates = web.Download(u);
var allrates = JSON.parse(getrates);
var currentdate = allrates.date;
var rate1 = allrates.rates.RON;
var rate2 = allrates.rates.GBP;
var rate3 = allrates.rates.HUF;
return tag.Size(25,'<b><color Blue>Exchange Rates</color></b>') + nL + tag.Size(20,'<b><color Blue>Date: </color></b>') + '<size 20>'+currentdate+'</size>'
+ nL + tag.Size(20,'<color White> '+base+' 1 = '+symbol1+' '+rate1+' </color>')
+ nL + tag.Size(20,'<color White> '+base+' 1 = '+symbol2+' '+rate2+' </color>')
+ nL + tag.Size(20,'<color White> '+base+' 1 = '+symbol3+' '+rate3+' </color>');
}
I know the Script could be better, but hey it’s my first attempt to write something in JScript… and it works
But if anybody would like to re-write the script, be my guest, but be so kind to share again.
The variable base is the currency to which the rates are displayed. The symbol1 to 3 are the currencies for wich the rates will be displayed. The annoying part is i couldn’t figure something out to make the variable rate1 to 3 dynamically dependent on the symbols… so if you want other currencies you will have to update the variables for symbols en those for allrates too (var rate1 = allrates.rates.RON). This definitely could be better.
Hi there,
Thanks in advance for this type of post, i am learning a lot… Succesfully customized Navigation screen to my needs, but cannot refresh, accounts, tickets and Voids info inside the Tiles, after ending the workperiod, how can i achieve that?
Tiles also refresh when you Navigate to Main Menu (Navigation screen). So you can click Main Menu in the bottom-right of the screen to force a refresh.
You could also create an Automation Command button (Tile) that executes the Navigate Action, and place that button on your screen.
Hi, thanks for the quick response, i had already tried using refresh, but it seems the information is locked with the workperiod, or i thought that before i did closed it, now that i have ended the workperiod, the info is still there, closed sambapos and reopend it, but info appears on tiles.
Cache is used mostly for when you have a Tile that accesses an external API such as the Weather, and it is set in Minutes. This means it will not update the Tile with new information until the cache timer has expired. It will even ignore a Navigation screen refresh. When the timer expires, it clears the cached data from memory and fetches new/current data.
Refresh is set in seconds, and is mostly used locally, such as displaying the song playing on a local audio application, or refreshing the Clocked-in time of an Employee.
If you have Cache and Refresh set, it will be constrained to the value in Cache.
This is the part that I couldn’t get it to work (version 5.1.58). . . What did I do wrong? All that did to mine was just highlighting the tile, but no customization dialog appears. . . .
Whoa, silly me XD ! it worked. I switched to my admin account and everything worked ! Thanks, QMcKay
I allowed my ‘manager’ user account to have every privileges except ‘admin right’. I thought that option was only for by-passing admin confirmation pin for automation command. Guess I was wrong (again XD!)