Logic Machine Forum
Vis Page PIN - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Vis Page PIN (/showthread.php?tid=3229)



Vis Page PIN - sjfp - 16.03.2021

Is it possible to adjust the PIN code set for a Visualisation using a script.
Want to be able to dynamically adjust the PIN so that its different every day. Like using partially the date as a Key.


RE: Vis Page PIN - admin - 17.03.2021

Which PIN do you want to change: level, plan, object or PIN for the whole visualization?


RE: Vis Page PIN - sjfp - 17.03.2021

(17.03.2021, 06:59)admin Wrote: Which PIN do you want to change: level, plan, object or PIN for the whole visualization?

Sorry, the Plan's PIN.
I have a particular page that I don't want engineers to open unless I ask them too. But I need the PIN to change so they cant use it the same PIN over and over again.


RE: Vis Page PIN - admin - 17.03.2021

Use this. It's recommended to keep PIN length the same. Otherwise it might not work for the end user who had the visualization already open when the PIN was changed.
Code:
id = 1 -- plan ID
db:update('visfloors', { pincode = '123456' }, { id = id })



RE: Vis Page PIN - sjfp - 17.03.2021

(17.03.2021, 08:39)admin Wrote: Use this. It's recommended to keep PIN length the same. Otherwise it might not work for the end user who had the visualization already open when the PIN was changed.
Code:
id = 1 -- plan ID
db:update('visfloors', { pincode = '123456' }, { id = id })

Many thanks. PIN script working