Hi Oliver,

I used a 'New Customer' option too, but just allowed users to manually input 
information in to OTRS rather than autopopulated from our database.

It sounds like you want to go down a similar road and have a database table 
holding all your customers - which you could add to via OTRS.

Unfortunately I do not know enough about your own environment to comment on now 
best to achieve this but you may be able to add an additionally table to your 
OTRS database to facilitate this.

If you wish to discuss this further 'offline', please feel free to email me 
directly.

Regards,

Graeme

Oliver Buckie wrote:
> Hi Graeme 
> 
> Many thanks for your feedback. What I would like is the possibility that the 
> drop-down can be populated the Agents themselves i.e. if the CustomerID does 
> not display a particular company name, then the agent can add one. Perhaps 
> the drop-down could have a value called "Add new...", and if this is 
> selected, then the Agent has the option to enter a new company via a newly 
> displayed text box which appears???
> 
> Any ideas? Thanks
> 
> Oliver
> 
> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Graeme Brough
> Gesendet: Montag, 20. Februar 2006 10:01
> An: User questions and discussions about OTRS.org
> Betreff: Re: [otrs] Re: CustomerID field as drop-down?
> 
> Hello Oliver,
> 
> Apologies for missing your original posting.
> 
> It certainly is possible to turn the CustomerID or any other field into a 
> drop-down.
> 
> But it depends how you what to populated the drop-down.  I created a 
> drop-down field that populated via a database (not OTRS db) query.
> 
> In every module where the field is referenced (using AgentEmail.pm as 
> example) you must add something like:
> 
> 
>>#
>># build siteid select
>>#
>># Connect to db and extract siteid info.
>>#
>>    my $CMP_Get = "SELECT DISTINCT CL.SITE_ID "
>>                . "FROM SITE_ID";
>>#
>>    my $dbh = &external_db_connect();
>>    my $sth = $dbh->prepare($Get);
>>    $sth->execute();
>>#
>>    while (my @SQLSiteID = $sth->fetchrow_array()) {
>>      $SiteIDData{$SQLSiteID[0]} = $SQLSiteID[0];
>>    }
>>#
>>    $Param{SiteIDStr} = "<select name=\"TicketFreeText1\" 
>> onchange=\"document.compose.ExpandCustomerName.value='3'; 
>> document.compose.submit(); return false;\">\n";
>>    $Param{SiteIDStr} .= "<option value=\"\"> Select SiteID<\/option>\n";
>>    $Param{SiteIDStr} .= "<option value=\"new\"> New 
>>Customer<\/option>\n"; #
>>    my $SiteIDAssign = index($Param{"TicketFreeTextField1"},"value=\"\"");
>>    if ($SiteIDAssign == -1) {
>>      $SiteIDAssign = index($Param{"TicketFreeTextField1"},"value=\"");
>>      $SiteIDStart = ($SiteIDAssign + 7);
>>      $SiteIDEnd = index($Param{"TicketFreeTextField1"},"\" size=\"30\"");
>>      $GetSiteID = 
>> substr($Param{"TicketFreeTextField1"},$SiteIDStart,($SiteIDEnd - 
>> $SiteIDStart));
>>    }
>>    foreach (sort keys %SiteIDData) {
>>      if ("$_" eq "$GetSiteID"){
>>        $Param{SiteIDStr} .= "<option selected 
>> value=\"$_\">$SiteIDData{$_}<\/option>\n";
>>      } else {
>>        $Param{SiteIDStr} .= "<option 
>> value=\"$_\">$SiteIDData{$_}<\/option>\n";
>>      }
>>    }
>>    $Param{SiteIDStr} .= "<\/select>\n";
> 
> 
> In this example, we connect to the external db and find a single occurrence 
> of eack Site ID, when build the HTML 'SELECT' tag and associated values.
> 
> If you replace 'TicketFreeTextField1' with 'CustomerID' it will work against 
> that field.
> 
> HTH,
> 
> Graeme
> 
> Oliver Buckie wrote:
> 
>>Would be great if any could comment on this... I need to find a way of have 
>>both contact (individuals)and company (firm) fields. The latter being a 
>>drop-down...
>>
>>Is it possible to turn the CustomerID field (in all instances) from a 
>>free-text field to a dropdown with pre-defined values (customer1, customer2, 
>>customer3 etc.)? If possible, would also be great if an agent could also 
>>add-to this field to populate the values.
>>
>>Thanks for your comments.
>>_______________________________________________
>>OTRS mailing list: otrs - Webpage: http://otrs.org/
>>Archive: http://lists.otrs.org/pipermail/otrs
>>To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
>>Support oder Consulting für Ihr OTRS System?
>>=http://www.otrs.de/
>>
>>----------
>>_______________________________________________
>>OTRS mailing list: otrs - Webpage: http://otrs.org/
>>Archive: http://lists.otrs.org/pipermail/otrs
>>To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
>>Support oder Consulting für Ihr OTRS System?
>>
>>
>>>http://www.otrs.de/
> 
> 
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> NOTICE: This email message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information.
> Any unauthorized review, use, disclosure or distribution is prohibited.
> If you are not the intended recipient, please contact the sender by reply 
> email and destroy all copies of the original message.
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
> 
> _______________________________________________
> OTRS mailing list: otrs - Webpage: http://otrs.org/
> Archive: http://lists.otrs.org/pipermail/otrs
> To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
> Support oder Consulting für Ihr OTRS System?
> =http://www.otrs.de/
> 
> 
> _______________________________________________
> OTRS mailing list: otrs - Webpage: http://otrs.org/
> Archive: http://lists.otrs.org/pipermail/otrs
> To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
> Support oder Consulting für Ihr OTRS System?
> 
>>http://www.otrs.de/

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

_______________________________________________
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
Support oder Consulting für Ihr OTRS System?
=> http://www.otrs.de/

Reply via email to