EnglishRussianUkrainianChinese
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Cascading lookup in custom fields

 
Post new topicReply to topic    TrackStudio Forum Forum Index -> TrackStudio Support
View previous topic :: View next topic  
Author Message
anders_ahlgren



Joined: 28 Mar 2008
Posts: 3

PostPosted: Fri Mar 28, 2008 5:08 pm    Post subject: Cascading lookup in custom fields Reply with quote

Is it possible to make scripted cascading lookup? For example, I have implemented a custom field "Customer" with a lookup script accessing a database to find the list of customers to put on the drop-down. It works fine.

However, I also want a "Contact" field which should have a drop-down with the contact persons relevant for the selected customer.

I have tried to implement this with a lookup script which pulls the "Customer" from the task, but it works only partially. If I enter a customer in the "Customer" field, save the task, and edit it, then the "Contact" dropdown gets the proper alternatives. However, when creating a new task the "Contact" list is of course initially empty, since there isn't any "Customer" selected. Problem is that when I do select a customer , then the contact dropdown isn't updated. It seems to use the last saved values for the task or, perhaps more likely, it runs the lookup script only before editing is started, not when dropping down the list or such.

Is there any way to solve this?

/Anders
Back to top
View user's profile Send private message
trackman



Joined: 23 Jul 2007
Posts: 56
Location: Cheltenham

PostPosted: Fri Mar 28, 2008 6:30 pm    Post subject: Reply with quote

Seems that the user would have to do something to get the page to refresh once the "Customer" value has been selected but if the "Contact" value was blank.

You might try a Create Task/INSTEAD OF script that would return an error if the "Contact value" was blank (thereby refresing the page and hopefully populating that dropdown) and otherwise save the task as entered.

It would be interesting to hear if this works!
Back to top
View user's profile Send private message
anders_ahlgren



Joined: 28 Mar 2008
Posts: 3

PostPosted: Fri Mar 28, 2008 7:11 pm    Post subject: Reply with quote

An interesting idea (although it wouldn't exactly be ideal to have to try to save to get a refresh...), but it doesn't work, unfortunately. The dropdown isn't refreshed after showing the error.

Any other ideas?

/Anders
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 01 Jan 1970
Posts: 4362
Location: Smolensk, Russia

PostPosted: Sat Mar 29, 2008 3:08 pm    Post subject: Reply with quote

anders_ahlgren wrote:
An interesting idea (although it wouldn't exactly be ideal to have to try to save to get a refresh...), but it doesn't work, unfortunately. The dropdown isn't refreshed after showing the error.

Any other ideas?

/Anders


The only idea I have - store customer and contact in the single field like:
Customer A / John
Customer A / Bill
Customer C / John

In this case you will select both customer and contact.
_________________
Maxim Kramarenko (mailto: maximkr@trackstudio.com)
TrackStudio - Hierarchical Bug & Issue Tracking Software
http://www.trackstudio.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
anders_ahlgren



Joined: 28 Mar 2008
Posts: 3

PostPosted: Mon Mar 31, 2008 10:22 am    Post subject: Reply with quote

Yes, I was afraid that would be the only answer.

Thanks,

Anders
Back to top
View user's profile Send private message
Display posts from previous:   
TrackStudio Forum Forum Index -> TrackStudio Support All times are GMT + 3 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Copyright © 2002-2007,   TrackStudio, Ltd.
Contact Us