Skip to main content

Hi

How can i create a business rule to run when a request is created between 5pm and 7am.

Is there is an expression i can use?

For example something like request.created_dttm <17:00 + <07:00

Thanks

Hi @PirtekKH,

You could try an expression input something like datepart(hour,request.created_dttm) BETWEEN 17:00:00 and 07:00:00. Not certain the Business Rule will like the hour extraction though.

Kind regards,

Lee Pinchbeck


Hi Lee

Is there a list of expressions that can be used by the business rules anywhere?

I also saw a reference to a 90 page business rule manual somewhere on the community, do you know where i can locate this?

Thanks


Hi @PirtekKH,

I am not aware of a list of expression but I believe the general rule is, if it would work as a query script run against the database directly then it should work as an expression. If it gets too complex you may need to script it instead and use that to trigger the Business Rule instead e.g. populate a temp table with the relevant records and then use a new entry in there as the input rule.

Not sure what documentation is being referred to there specifically but there is the in app documentation found by clicking the question mark in FSM at the top right when on the Business Rule page. Some documentation would also be here in the forums if you do a search of the Community. Other than that you would have the IFS Academy which is where all the proper training should be obtained from.

If you are likely to be doing a lot of work within the Business Rules beyond tweaking the odd existing one and you have not had any training in this area I would strongly recommend contacting IFS to have some training given as it is a highly useful area of the system but does take a fair bit of knowledge to use it to its full potential.

Kind regards,

Lee Pinchbeck


I usually solve these logic battles with a view and compare against something simple. I might make a view and have a column that does the logic for you (sql case statement to see if the date fits the params) and outputs Y or N and the business rule simply fires if it’s a Y.

 

Lee might be able to tell us if this is bad practice.