Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
3 replies Latest Post - ‏2013-03-22T17:08:04Z by melshah
melshah
melshah
70 Posts
ACCEPTED ANSWER

Pinned topic Perl hook for choicelist not enabled for writing

‏2013-03-21T19:19:21Z |
Hello.

I am changing all the code from VB to Perl

For one of the field name i want to write the perl code for "choice list"
when i select perl language from choice field column and double click on it it opens the function but i am not able to write anything its basically read only. If i change the field language from Perl to basic i am able to edit and write it.

My scripting language from schema properties is selected to "PERL"

I am the superuser. can someone help on why its not writable

-Sagar
Updated on 2013-03-22T17:08:04Z at 2013-03-22T17:08:04Z by melshah
  • Lumart
    Lumart
    87 Posts
    ACCEPTED ANSWER

    Re: Perl hook for choicelist not enabled for writing

    ‏2013-03-22T09:30:12Z  in response to melshah
    Actually, you can't have both Perl and VB hooks working at the same time.
    You choose the scripting language in the schema properties and then you can write either Perl or VB hooks.
    The scripting language is a property of a schema version, not of the schema as a whole, so changing it does not affect the previous versions.
    If you prefer to do this editing on a seprate schema, "clone" the original one and then do an exportintegration/integration in order to align the original schema, when you've finished editing the copy.
    • melshah
      melshah
      70 Posts
      ACCEPTED ANSWER

      Re: Perl hook for choicelist not enabled for writing

      ‏2013-03-22T15:49:42Z  in response to Lumart
      Hi,
      I have changed the schema Properties--->scripting language to perl
      for the field "choice list column" i removed the "Basic" and selected "None" it asked me that i want to remove the script and i said yes. after that i changed it to perl and double clicked on it and it opened up the function
      I am assuming that it should allow me to edit now to write the perl code but its grayed out and do not let me edit the function to write my code what am i missing

      sub rartifacts_ChoiceList {
      my($fieldname) = @_;
      my @choices;
      # $fieldname as string scalar
      # @choices as string array
      # record type name is SCR
      # field name is Related_artifacts
      # Use array operation to add items. Example:
      # push(@choices, "red", "green", "blue");
      return @choices;
      }
    • melshah
      melshah
      70 Posts
      ACCEPTED ANSWER

      Re: Perl hook for choicelist not enabled for writing

      ‏2013-03-22T17:08:04Z  in response to Lumart
      Hi,

      Actually i do not intend to run perl and vb scripts in the same schema version i want to change the all the functions which are written in vb to perl. I am changing the functions/subroutines from vb to perl one by one so for a particular schema version if for a field the code is written in vb i wish to change it to perl ( by changing the schema properties from Basic to Perl). also for a field "choice list column" where the code is written in VB if i change to perl it asks me to remove the "VB hooks" for which i select yes. But when i change it to perl it does not allow me to edit why cant i edit it ?

      -Sagar