Home > Forum > General > Form rules on load of main page?

Form rules on load of main page?
0

He all,
I was searching, but can't find information anywhere. Is there a possibility to run some javascript or form rules on load of the main website page of local webcon instance?
I'm preparing a process where users manually confirm their being at work. It would be very appeciated, that when tey load any page of local webcon instance, there would be some code testing if they already confirmed their being at work. If they didn't, they would be redirected to the appropriate element. If they did, nothing would happen.
Is there a way to do this in webcon, or do I need to do it with external tools?

MVP

Hi Michał,

I'm not aware of any option. I found one "option", but I don't really like it.

https://daniels-notes.de/posts/2023/global-js

I've an idea for an external tool approach:
You could deploy to a PowerShell script to each PC.
This script could use the API to get the report /view of todays "being at work" confirmations.
If there's none for the current user, you could open the browser with the URL to create a new entry.
The script could be executed via the task schedule and trigger "user logged on".

But this would only work, if there's internet connection and how to store the password of the Application, so that the users can't vie the information of other users.

Btw, you could also modify my "Punch clock" project slightly:
https://daniels-notes.de/posts/2020/yet-another-simple-punch-clock
Instead of logging to a local file you could use the API to start the workflow.

I've read the other post, but I don't have a vacation request and currently no time for creating one.

Best regards, Daniel