CA Service Management

Expand all | Collapse all

Need to hide a field for Change Order status "RFC".

  • 1.  Need to hide a field for Change Order status "RFC".

    Posted Jun 01, 2018 04:59 AM

    Hi Team,

    I need to hide a field "Configuration Item" - (Text box), while we are raising a change order ticket with status RFC.

     

    My Condition:

    When Status=RFC then hide the field  "Configuration Item". After changing the status it should be visible for rest of the status and make it required for rest Status.

     

    Please suggest.

    Regards,

    Jagatjyoti Dash



  • 2.  Re: Need to hide a field for Change Order status "RFC".

    Posted Jun 01, 2018 09:21 PM

    Hi dasja02,

     

    What difference is there in hiding or blocking?. The second option is less invasive because no code in form, you can configure a record on RFC Status.

     

     

    If is a custom field, this shows with z{name} defined on list_OAColumns.

     

    Regards



  • 3.  Re: Need to hide a field for Change Order status "RFC".

    Posted Jun 02, 2018 02:22 AM

    Hi It will not help me.

    I need that : While raising a CO for RFC status I need to hide that text box.

     

    Regards,

    Jagat



  • 4.  Re: Need to hide a field for Change Order status "RFC".

    Broadcom Employee
    Posted Jun 02, 2018 06:14 PM

    Try this for the custom field you have created for Configuration Item (By default there is no configuration Item field in CO):

     

    I am showing this for the "CAB" field. you may use the name of your field you have created:

     

    <PDM_IF "$args.id" != "">
    <PDM_MACRO name=dtlLookup hdr="CAB" attr=cab>
    </PDM_IF>

     

    To make it mandatory you may add the "make_required=yes" like below:

     

    <PDM_IF "$args.id" != "">
    <PDM_MACRO name=dtlLookup hdr="CAB" attr=cab make_required="yes">
    </PDM_IF>

     

    Hope this helps.



  • 5.  Re: Need to hide a field for Change Order status "RFC".

    Broadcom Employee
    Posted Jun 02, 2018 06:39 PM

    Also, to make it not show the field as long as the status is RFC, you should have something like this:

     

    <PDM_IF "$args.id" != "" && "$args.status" != "RFC">
    <PDM_MACRO name=dtlLookup hdr="CAB" attr=cab make_required="yes">
    </PDM_IF>



  • 6.  Re: Need to hide a field for Change Order status "RFC".

    Posted Jun 03, 2018 04:49 AM

    Hi Indrajit,

    What will be ,$args.id,CAB and "$args.id !=" or "$args.id=="   ?

     

    Regards,

    Jagat 



  • 7.  Re: Need to hide a field for Change Order status "RFC".

    Broadcom Employee
    Posted Jun 04, 2018 12:04 AM

    Hi Jagat,

    Sorry, I did not understand your question.

    What I suggested was to use the WSP and modify the detail_chg.htmpl file and wherever you have the custom configuration item field in the form (as per your screen shot, just after the "CAB" field) with the above lines - like below:

     

    <PDM_IF "$args.id" != "" && "$args.status" != "RFC">

    .... You will have your configuration item line here .... add "make_required="yes" like I have shown above

    </PDM_IF>

     

    Now:

     "$args.id" != ""  - means the value of the attribute args.id is not null.

     

    Do not worry about that, just type as I have mentioned.

    Thanks,

    Indrajit.



  • 8.  Re: Need to hide a field for Change Order status "RFC".

    Posted Jun 06, 2018 08:52 AM

    Please let me know where to write the code inside detail_chg.htmpl.

     

    Regards,

    Jagat



  • 9.  Re: Need to hide a field for Change Order status "RFC".

    Broadcom Employee
    Posted Jun 06, 2018 09:00 AM

    Hi Jagat,

     

    you need to search for this specific code highlighted in Bold. and follow the next line as suggested by Indrajit. Hope this helps?

     

    <PDM_IF "$args.id" != "" && "$args.status" != "RFC">
    <PDM_MACRO name=dtlLookup hdr="CAB" attr=cab make_required="yes">
    </PDM_IF>



  • 10.  Re: Need to hide a field for Change Order status "RFC".

    Broadcom Employee
    Posted Jun 04, 2018 04:57 AM

    Hi Jagat,

     

    Could you confirm if the information provided by Indrajit helped you in resolving your requirement?



  • 11.  Re: Need to hide a field for Change Order status "RFC".

    Posted Jun 06, 2018 09:26 AM

    Hi ,

    No Maheswar its not working.

    My requirement:

    I need to hide a text box while logging Change order for Status RFC.

     

    Regards,

    Jagat



  • 12.  Re: Need to hide a field for Change Order status "RFC".

    Posted Jun 06, 2018 09:41 AM

    try just this, it will hide CAB field as long as the CO is in RFC status

     

    <PDM_IF "$args.status" != "RFC">
    <PDM_MACRO name=dtlLookup hdr="CAB" attr=cab make_required="yes">
    </PDM_IF>



  • 13.  Re: Need to hide a field for Change Order status "RFC".

    Broadcom Employee
    Posted Jun 06, 2018 10:00 AM

    Hi Jagat,

     

    I have tested the code in my system and it works. Not sure what's going on in your case. Is it possible to upload the detail_chg.htmpl file that you are using and I can test it out.

     

    Thanks.



  • 14.  Re: Need to hide a field for Change Order status "RFC".

    Broadcom Employee
    Posted Jun 06, 2018 11:53 AM

    Jagat, I think guys misunderstand you requirement...the moment an analyst changes status to RFC, the Configuration Item field display disappears. This is really a challenge that the field already displays when the status changes that we need to refresh the page with a different set of fields to display(that is BEFORE click on the save button). If you are thinking about AFTER save button is clicked, then you can consider using PDM_IF statement for the display of Configuration Item like

    <PDM_IF "$args.status" != "RFC">
    <PDM_MACRO ....> to display the Configuration Item field
    </PDM_IF>

    Thanks _Chi



  • 15.  Re: Need to hide a field for Change Order status "RFC".

    Posted Jun 06, 2018 02:35 PM

    Hi Chi,

    You are correct , I need the moment an analyst changes status to RFC, the Configuration Item field display disappears."

     

    Please suggest for this what I will do?

     

    Regards,

    Jagatjyoti Dash



  • 16.  Re: Need to hide a field for Change Order status "RFC".

    Broadcom Employee
    Posted Jun 06, 2018 04:14 PM

    Jagatjyoti, I don't have answer to this and to me it is very challenging. It is pretty much you capture the keys entered in "status" field while the user is typing and then match with "RFC" and re-paint. Also would need to handle lookup pick. The way SDM uses its macros for those fields makes it very challenging. Thanks _Chi



  • 17.  Re: Need to hide a field for Change Order status "RFC".

    Posted Jun 07, 2018 01:59 AM

    Hi Chi,

    Can you refer some body who can give me a solution.

     

    Thanking you and best regards,

    Jagat



  • 18.  Re: Need to hide a field for Change Order status "RFC".
    Best Answer

    Posted Jun 07, 2018 08:29 AM

    There is no supported way to dynamically show/hide field in SDM.

     

    You can go fullon Javascript and achieve it but based on the knowledge you seems to have with ServiceDesk I will say it that way :

     

    Someone of the community will need to do it completely for you and this is not the goal. We are here to help, not work for you.

     

     

    What you need is : A course of Javascript, html and jquery



  • 19.  Re: Need to hide a field for Change Order status "RFC".

    Posted Jun 07, 2018 09:30 AM

    Ok thanking you ...

     

    Regards,

    Jagat



  • 20.  Re: Need to hide a field for Change Order status "RFC".

    Broadcom Employee
    Posted Jun 15, 2018 08:55 AM

    dasja02 

     

    Do you have any additional questions regarding this topic?

     

    If not, please mark one of the provided answers as Correct so that this thread can be closed.