Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Rules with date custom field

SOLVED
Go to solution
Highlighted
danillu
Occasional Contributor

Rules with date custom field

Hi,

Does anybody knows if I can create a rule (in SD4.5 SP18) that set a date custom field with the value “the next Tuesday”
in date format?, that is to say, if today it's 04/01/2007 I want that the rule set that custom field with the value 09/01/2007 (the next Tuesday).

Thanks in advance.
5 REPLIES
George M. Meneg
Honored Contributor

Re: Rules with date custom field

Hello,

You'd better do that with an external tool because though it can be done is SD it's very clumsy.

The General Idea:
1. Create a custom number field
2. Set custom field to have the value $D$ (this returns the current day of the week, 1-Sun to 7-Sat
3. Create seven ui rules for each value of the custom number to add a fixed timespan in days in the custom date field.

For example if custom number=5 (Thursday) then add 5 days to your date field.

menes fhtagn
danillu
Occasional Contributor

Re: Rules with date custom field

Thanks George,

I have tried to do what you say but I can't set the value $D$ in a custom number field, because it contains nonnumerical characters.

How I can do it?
Ruth Porter
Honored Contributor
Solution

Re: Rules with date custom field

Hi there,

I think you can modify George'e idea (whic as ever is a great one) by using a custom TEXT field. Set this as he suggests to have the value $D$.
Then create his seven ui rules for each value of the custom text to add a fixed timespan in days in the custom date field.

Hope this helps

Ruth
http://www.teamultra.net
George M. Meneg
Honored Contributor

Re: Rules with date custom field

OK, do the following:

Select a text field from the "Fields" dropdown an set it to "$D$". But before pressing Add to list, delete and *TYPE* the name of the custom number field. Then press Add to list.
menes fhtagn
George M. Meneg
Honored Contributor

Re: Rules with date custom field

... or as Ruth suggested use a custom text field :)
menes fhtagn
//Add this to "OnDomLoad" event