Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic add multiple resources for resourceplanning (Read 2387 times)
elwin68
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Feb 24th, 2010
add multiple resources for resourceplanning
Apr 12th, 2010 at 1:53pm
Print Post  
Hello,

I have the following problem.
When opening my resourceplanning all planning entries are selected from the SQL database and will be added as appointments.
Every appointment can have 1 or more linked resources. These will be added by using the following statement:
Calendar.Resources.Add(Res)

When the same resource is found multiple times it is shown multiple times in the resource view.
This is not wanted, so I only add the resource when it is not found already.
I use the following:
If Not Calendar.Resources.Contains(Res.Id) Then
  Calendar.Resources.Add(Res)
End If

Now the resources are shown just 1 time but another issue is not good.
Only the appointment for the first resource is shown in the resource view. The other ones are not shown.

How can I achieve this?

Thanks in advance.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: add multiple resources for resourceplanning
Reply #1 - Apr 12th, 2010 at 2:11pm
Print Post  
Make sure that the item is associated with the correct resource. For example, if you have an item associated with resources 1 and 2, and another item associated with resources 2 and 3, make sure that resource 2 in both items is effectively the same object. Otherwise the second item will be associated with another resource (although with the same Id) and will not appear if the Calendar is grouped by the first resource 2 only. To do this, when loading the SQL data and establishing associations between resources and items, make sure that resources with the same Id are represented by a single Resource object and all associated items use this object.

Regards,
Meppy
  
Back to top
 
IP Logged
 
elwin68
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Feb 24th, 2010
Re: add multiple resources for resourceplanning
Reply #2 - Apr 12th, 2010 at 2:21pm
Print Post  
Thanks for the quick answer  Smiley

I thought giving it the same Id would be enough.

I will give it a try.
  
Back to top
 
IP Logged
 
elwin68
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Feb 24th, 2010
Re: add multiple resources for resourceplanning
Reply #3 - Apr 13th, 2010 at 8:11am
Print Post  
It works like a charm.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint