" /> Almost as ListObject but many to one - Genesys CTI User Forum

Author Topic: Almost as ListObject but many to one  (Read 3520 times)

Offline Mikael Jansson

  • Newbie
  • *
  • Posts: 28
  • Karma: 2
Almost as ListObject but many to one
« on: August 07, 2008, 03:01:15 PM »
Advertisement
Hi !
I would like to have a function that works a blit like ListObjects.

In stead of having a listobject contaning items as belov:

[table]
[tr]
[td]rp_99001[/td][td]09:00-17:00[/td]
[/tr]
[tr]
[td]rp_99002[/td][td]09:00-17:00[/td]
[/tr]
[tr]
[td]rp_99003[/td][td]09:00-17:00[/td]
[/tr]
[tr]
[td]rp_99004[/td][td]10:00-20:00[/td]
[/tr]
[tr]
[td]rp_99005[/td][td]10:00-20:00[/td]
[/tr]
[tr]
[td]rp_99006[/td][td]10:00-14:00[/td]
[/tr]
[/table]

I would like something like this:

[table]
[tr]
[td]rp_99001,rp_99002,rp_99003[/td][td]09:00-17:00[/td]
[/tr]
[tr]
[td]rp_99004,rp_99005[/td][td]10:00-20:00[/td]
[/tr]
[tr]
[td]rp_99006[/td][td]10:00-14:00[/td]
[/tr]
[/table]

Any suggestions on hov to solve this?

/ Micke

K

  • Guest
Re: Almost as ListObject but many to one
« Reply #1 on: August 07, 2008, 06:51:50 PM »
I'm not sure how you would create something like that.

Two alternatives:
#1 = A little kludgy, but create two list objects:
The first one will have your hours:
0900-1700 = Time[] > 09:00 & Time[] <17:00
1000-1800 = Time[] > 10:00 & Time[] <18:00
etc.

The second one will have The routepoint related to the first list object

rp_99001 = 0900-1700
etc

Then when you need to change the hours, you either change the times in the first list or change the value in the second.

In short, your second list relates the labels and the corresponding times, and the first list object relates the routepoint to the labels.

#2 = An alternative, which I'm currently using:
I relate the service hours to a value, such as MF_0900-1800 (Open Monday to Friday, 0900 - 1800). I pass this value to a subroutine, where I pass through a series of Segmentation objects looking for the corresponding value. When I find the value, the next step is a Business Rules object, where I have attributes set to DayOfWeek[] >= Monday and DayOfWeek[] <= Friday and Time[] >= 0900 and Time[] <= 1800.

When I need to add a new value, I create the attributes, business rule, and update the subroutine. When times change on a service team, I just have to update a value in the list object.

Offline catanirex

  • Sr. Member
  • ****
  • Posts: 272
  • Karma: 11
Re: Almost as ListObject but many to one
« Reply #2 on: August 09, 2008, 08:15:31 AM »
Hi again,

If you define it like this perhaps?

rp_99001 OH_A
rp_99002 OH_A
rp_99003 OH_A
rp_99004 OH_B
rp_99005 OH_B
rp_99006 OH_C


Then you define the opening hours under another section.