Setting a deadline or before date

0
Hi,   What is the best way to give a user the possibility to set a deadline for an employee to fill in a form? For example; I want to set one deadline so that it's only possible for employees to fill in a form before that deadline.    I was thinking of making an entity “deadline”, but should I make that entity a parameter of the microflow I build for other checks? Or is there an other way to do this? Can't really find anything on the forum, except from workflows which I’m not using.   Kind regards, Ralph
asked
4 answers
1

Hi Ralph, great question. There are definititely more ways to achieve this goal.

 

You can use a microflow to navigate to the form.

In this microflow you can create a view object with an attribute deadline (datetime).

You probably want to set it relative to the currentDateTime of the user.

Connect the object from the form with the view object.

On the form page you can use that deadline to verify if the user is before the deadline.

 

answered
1

Yes then it would make sense to store it on an global object or on the planner. If you could show us how your domain model looks that would help. 

 

If you create that object, then you would have to fill it by creating it if it does not exist (something like this):

 

Pass this object to a page, and let the planner fill the deadline on that object there.

 

Then when creating a deadline, fetch the first object of your deadline and use that date to limit users filling out the form. This can be done with a security rule or with logic, depending on how you want to process to go. If you do it on security you would have to add access rules and otherwise you can check in logic if the deadline Deadline >= '[%CurrentDateTime%]' if so allow users to create an object.

 

 

 

 

answered
0

What is important is to think about is if this deadline is global. If you for example want to set a global deadline for every docent, or if you want to have different deadlines for different docents. But also if a planner would want to sent multiple deadlines. If you know the answer to those questions it is easier to determine where you will store that data.

 

For example you could store the attribute on the docent, which would mean that you will have to set it explicitly for every docent.

 

Or globally on the planner, but that means that if the planner changes the deadline, it will be changed for every docent.

 

Another option would be to set it on the ‘Beschikbaarheid’ and let the planner create that object with the deadline. Assign it to a docent and then show it to the docent and let the docent fill that form out.

 

The way the businessprocess works determines how your data structure should look.

 

 

answered
0

The error you are getting means that $Deadline/Deadline is not filled, make sure that this object is allready created before performing the check. The planner has to create that object first, because it will be empty if you don't. Meaning before doing that check on the date with the user that has to add Beschikbaarheid you should also perform an empty check on deadline object.

answered