Topic
  • 4 replies
  • Latest Post - ‏2013-10-11T19:25:29Z by DevM
DevM
DevM
32 Posts

Pinned topic How do I use the PERL API to setValue to blank

‏2013-09-26T20:17:57Z |

Hi,

  The title says it all. No code needed. In Rational Change I have a text box in a form that I need to clear the data in across the database.

  I thought I could use $temp->getDataObjectByName("id")->setValue("") but that does not clear the attribute. Is there a Null or delete or method I'm missing? Before you ask, setValue is working. I can put text into the field on the form and update it in the database. I just can't seem to clear the text box.

  Any help would be appreciated.

 

Thank You,

  DevM

  • Mike.Scharnow
    Mike.Scharnow
    74 Posts
    ACCEPTED ANSWER

    Re: How do I use the PERL API to setValue to blank

    ‏2013-09-27T11:11:52Z  

    Hi DevM,

    generally this should work, I use it very often.

    I think I remember that there was a bug in one Change version where this did not work correctly.

    Which version do you use?

    And: Is "id" a mandatory attribute? In this case the setValue should work but the "ModifyCR" not.

    You might want to switch on Change debugging to see whether the XML code which is generated.

    You should see something like 

           <DATA>
                    <NAME>
                            id
                    </NAME>
                    <VALUE>
                            <void>
                    </VALUE>
            </DATA>
     
     

    if you did everything correctly.

     

    HTH

    Mike

    Updated on 2013-09-27T11:12:20Z at 2013-09-27T11:12:20Z by Mike.Scharnow
  • Mike.Scharnow
    Mike.Scharnow
    74 Posts

    Re: How do I use the PERL API to setValue to blank

    ‏2013-09-27T11:11:52Z  

    Hi DevM,

    generally this should work, I use it very often.

    I think I remember that there was a bug in one Change version where this did not work correctly.

    Which version do you use?

    And: Is "id" a mandatory attribute? In this case the setValue should work but the "ModifyCR" not.

    You might want to switch on Change debugging to see whether the XML code which is generated.

    You should see something like 

           <DATA>
                    <NAME>
                            id
                    </NAME>
                    <VALUE>
                            <void>
                    </VALUE>
            </DATA>
     
     

    if you did everything correctly.

     

    HTH

    Mike

    Updated on 2013-09-27T11:12:20Z at 2013-09-27T11:12:20Z by Mike.Scharnow
  • DevM
    DevM
    32 Posts

    Re: How do I use the PERL API to setValue to blank

    ‏2013-09-27T13:08:07Z  

    Hi DevM,

    generally this should work, I use it very often.

    I think I remember that there was a bug in one Change version where this did not work correctly.

    Which version do you use?

    And: Is "id" a mandatory attribute? In this case the setValue should work but the "ModifyCR" not.

    You might want to switch on Change debugging to see whether the XML code which is generated.

    You should see something like 

           <DATA>
                    <NAME>
                            id
                    </NAME>
                    <VALUE>
                            <void>
                    </VALUE>
            </DATA>
     
     

    if you did everything correctly.

     

    HTH

    Mike

    Mike,

      We are using Rational Change Ver 5.3. The ID is a coded sequence not the system attribute. So, no I'm not encountering that problem. I'm a little vague on how to turn on Change Debugging but I'll see if I can turn it on.

      So you are saying setValue("") should work? Then I am in very big trouble.

     

    Thanks,

      DevM

  • Gerard Cregan
    Gerard Cregan
    4 Posts

    Re: How do I use the PERL API to setValue to blank

    ‏2013-10-04T10:16:38Z  
    • DevM
    • ‏2013-09-27T13:08:07Z

    Mike,

      We are using Rational Change Ver 5.3. The ID is a coded sequence not the system attribute. So, no I'm not encountering that problem. I'm a little vague on how to turn on Change Debugging but I'll see if I can turn it on.

      So you are saying setValue("") should work? Then I am in very big trouble.

     

    Thanks,

      DevM

    Hello DevM,

     

    See below for setting debug option.

     

    http://pic.dhe.ibm.com/infocenter/chghelp/v5m3/topic/com.ibm.rational.change.admin.doc/topics/ch_t_ha_use_evnt_log_dbug_cng_trc.html

    Controlling the debugging feature and managing the log file

    When issues or errors occur, use the Event Log dialog box to control the debugging feature and to manage the log file. The Event Log provides information to help you diagnose and correct the issue.

    Procedure

    1. Log on to the Admin interface, and then click Home.
    2. In the Server Monitoring list, click Event Log to display the log.
    3. Select one of the following options:
      • Refresh to see updates to the log since it was last loaded in to the interface.
      • Download to download the log to your computer to view the log in a text editor, submit the log with a change request, and so on.
      • Clear to delete the log.
        Attention: There is no undo option. When the log has been cleared, it cannot be retrieved.
    4. Optionally, enable the Log Debug Messages feature to view more specific details about what is occurring within the system.
      Note: Leaving this feature enabled degrades performance. Turn the feature off when you have finished the debugging process.

     

    Regards,

    Gerard.

  • DevM
    DevM
    32 Posts

    Re: How do I use the PERL API to setValue to blank

    ‏2013-10-11T19:25:29Z  

    Guys,

       I would like to thank you for all your help. It turns out that 'blanking' works just the way it should. What I didn't realize was that the trigger that creates the ID numbers was firing after I blanked, and saved the change to, the textbox. So, i could not see that the 'blanking' had worked because everytime I turned around there were new numbers there.

      I fixed the problem by adding a placeholder instead of a blank and consider this matter closed.

     

     Thank You,

       DevM