Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Setting appointment location using location Key. (Read 4316 times)
TRB
Junior Member
**
Offline


Meppy knows all!!

Posts: 80
Location: Australia
Joined: Jun 7th, 2013
Setting appointment location using location Key.
Sep 10th, 2013 at 6:12am
Print Post  
Hi.....Again..
         I need to set the appointment location based on the location key.

I have the key (I get this as part of a drag event from another control) and need to return the location for that key..i have used the Id but need to do this using the key instead.
Thanks
  

Regards,
TRB
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Setting appointment location using location Key.
Reply #1 - Sep 10th, 2013 at 6:40am
Print Post  
Hi,

What do you mean by location key?

Regards,
Meppy
  
Back to top
 
IP Logged
 
TRB
Junior Member
**
Offline


Meppy knows all!!

Posts: 80
Location: Australia
Joined: Jun 7th, 2013
Re: Setting appointment location using location Key.
Reply #2 - Sep 10th, 2013 at 8:43am
Print Post  
I mean the key (Primary Key) from the dataset. Each table has an Id and a primary key. Due to the fact that the "Key" is what links everything together (the relationship between Items, Contacts, Resources and Locations) and that I am not using the save to method, I would like to use the "Key" Column to retrieve and update data. I would also like to use it to add locations to an appointment.
For example,
Code
Select All
For Each l as location In Calendar.Schedule.Locations
If Location.Key = MyKey Then e.Item.Location = l
Next
 


I know this won't work but is there something similar??
  

Regards,
TRB
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Setting appointment location using location Key.
Reply #3 - Sep 10th, 2013 at 10:17am
Print Post  
Hi,

If you are loading the schedule data manually from a database, you can store the primary key in the location's Tag property. Then compare the specified MyKey to Location.Tag. Alternatively you can create a Key<->Location mapping during load then look-up for the location, given its primary key.

Regards,
Meppy
  
Back to top
 
IP Logged
 
TRB
Junior Member
**
Offline


Meppy knows all!!

Posts: 80
Location: Australia
Joined: Jun 7th, 2013
Re: Setting appointment location using location Key.
Reply #4 - Sep 10th, 2013 at 10:23am
Print Post  
Thanks Meppy,
I am useing the loadfrom method and only saving and updating data manually.

Thanks for the reply.
  

Regards,
TRB
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Setting appointment location using location Key.
Reply #5 - Sep 10th, 2013 at 11:08am
Print Post  
Hi,

I see no way of binding the Key to a Location property using the built-in databinding because the Key is already used in a binding. Maybe you can still manually create a Key<->Location map during loading and use this map to find locations given their keys. Also, is it an option to rework the drag data to supply the Id (rather than the Key) of the appointment?

Regards,
Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint