Topic
  • 4 replies
  • Latest Post - ‏2013-06-24T13:10:21Z by Demonic240
Demonic240
Demonic240
26 Posts

Pinned topic How to display Worklog Resolution on main SR tab

‏2013-06-20T13:35:15Z |

Hi all,

I'm looking to use a crossover domain to display the most recent 'Resolution' type worklog entry associated with a ticket on the main page. I've created the domain, and have been trying a few different validation clauses, but I can't seem to get it to work. I've created a new field for the information to display in as well. Any help would be appreciated.

I'm attempting to use the following where clause:

worklogid in (select max(worklogid) from worklog where recordkey = :ticketid and class = :class and logtype = 'RESOLUTION')

Updated on 2013-06-24T13:22:11Z at 2013-06-24T13:22:11Z by Demonic240
  • SASHULL
    SASHULL
    403 Posts
    ACCEPTED ANSWER

    Re: How to display Worklog Resolution on main SR tab

    ‏2013-06-24T13:00:06Z  

    Thanks for the response. We currently have the where clause as a relationship on the SR, and I've added "WORKLOG.DESCRIPTION" to the field on the SR, however it's not giving me the record I want. I've tested the where statement directly against our database and it returns the desired result.

    To reference your relationship in Application Designer, you just need to drag a control (say a TEXTBOX) where you want it and set the Attribute binding to RELATIONSHIPNAME.FIELDNAME. If your relationship name in DB Config was MAXRESOLUTION, and you wanted the Description field (attribute), you would bind it to MAXRESOLUTION.DESCRIPTION.

    You can even chain more than one relationship (going from say WORKORDER->PERSON->LABOR) simply by choosing the relationships necessary to get you to each object and concatenate. For the example above, this could be REPORTEDBY.LABOR.LABORCODE for instance where REPORTEDBY is a relationship from Work Order to Person, Labor is a relationship from Person to LABOR, and laborcode is the field on LABOR we want to display.

    We typically advise that you make fields that go through a relationship Read Only, as they often are used for display purposes only. In that case just set the Input Mode on the textbox to Read Only.

  • SASHULL
    SASHULL
    403 Posts

    Re: How to display Worklog Resolution on main SR tab

    ‏2013-06-23T20:27:43Z  

    A crossover domain will only work if a field is being set/updated (say on the Work Order object, Assetnum field). When set the crossover event will fire and bring over the attributes from Asset Object to the Work Order object. In your case, the field being updated (or in this case created) is on a different table entirely and while you could cross over values from the SR to the Work Log, you can't do the reverse with a crossover domain. What I would suggest is doing one of 2 things:

    1) Create an automation script that has an object launch point of ADD on the WORKLOG object (filter in the Object Event condition that the APPNAME is your application or in the Automation script have an if statement that verifies the app is for SR). As records are added, you can update the custom field on the SR.

    2) Create a relationship in Database Configuration from SR to WORKLOG using the where clause you specified above. Then on the screen you can reference this relationship (such as MAXRESOLUTION.DESCRIPTION) and display any of the fields you want.

    I personally would recommend the second and that way you aren't redundantly storing the same information.

  • Demonic240
    Demonic240
    26 Posts

    Re: How to display Worklog Resolution on main SR tab

    ‏2013-06-24T12:30:41Z  
    • SASHULL
    • ‏2013-06-23T20:27:43Z

    A crossover domain will only work if a field is being set/updated (say on the Work Order object, Assetnum field). When set the crossover event will fire and bring over the attributes from Asset Object to the Work Order object. In your case, the field being updated (or in this case created) is on a different table entirely and while you could cross over values from the SR to the Work Log, you can't do the reverse with a crossover domain. What I would suggest is doing one of 2 things:

    1) Create an automation script that has an object launch point of ADD on the WORKLOG object (filter in the Object Event condition that the APPNAME is your application or in the Automation script have an if statement that verifies the app is for SR). As records are added, you can update the custom field on the SR.

    2) Create a relationship in Database Configuration from SR to WORKLOG using the where clause you specified above. Then on the screen you can reference this relationship (such as MAXRESOLUTION.DESCRIPTION) and display any of the fields you want.

    I personally would recommend the second and that way you aren't redundantly storing the same information.

    Thanks for the response. We currently have the where clause as a relationship on the SR, and I've added "WORKLOG.DESCRIPTION" to the field on the SR, however it's not giving me the record I want. I've tested the where statement directly against our database and it returns the desired result.

    Updated on 2013-06-24T12:56:22Z at 2013-06-24T12:56:22Z by Demonic240
  • SASHULL
    SASHULL
    403 Posts

    Re: How to display Worklog Resolution on main SR tab

    ‏2013-06-24T13:00:06Z  

    Thanks for the response. We currently have the where clause as a relationship on the SR, and I've added "WORKLOG.DESCRIPTION" to the field on the SR, however it's not giving me the record I want. I've tested the where statement directly against our database and it returns the desired result.

    To reference your relationship in Application Designer, you just need to drag a control (say a TEXTBOX) where you want it and set the Attribute binding to RELATIONSHIPNAME.FIELDNAME. If your relationship name in DB Config was MAXRESOLUTION, and you wanted the Description field (attribute), you would bind it to MAXRESOLUTION.DESCRIPTION.

    You can even chain more than one relationship (going from say WORKORDER->PERSON->LABOR) simply by choosing the relationships necessary to get you to each object and concatenate. For the example above, this could be REPORTEDBY.LABOR.LABORCODE for instance where REPORTEDBY is a relationship from Work Order to Person, Labor is a relationship from Person to LABOR, and laborcode is the field on LABOR we want to display.

    We typically advise that you make fields that go through a relationship Read Only, as they often are used for display purposes only. In that case just set the Input Mode on the textbox to Read Only.

  • Demonic240
    Demonic240
    26 Posts

    Re: How to display Worklog Resolution on main SR tab

    ‏2013-06-24T13:10:21Z  
    • SASHULL
    • ‏2013-06-24T13:00:06Z

    To reference your relationship in Application Designer, you just need to drag a control (say a TEXTBOX) where you want it and set the Attribute binding to RELATIONSHIPNAME.FIELDNAME. If your relationship name in DB Config was MAXRESOLUTION, and you wanted the Description field (attribute), you would bind it to MAXRESOLUTION.DESCRIPTION.

    You can even chain more than one relationship (going from say WORKORDER->PERSON->LABOR) simply by choosing the relationships necessary to get you to each object and concatenate. For the example above, this could be REPORTEDBY.LABOR.LABORCODE for instance where REPORTEDBY is a relationship from Work Order to Person, Labor is a relationship from Person to LABOR, and laborcode is the field on LABOR we want to display.

    We typically advise that you make fields that go through a relationship Read Only, as they often are used for display purposes only. In that case just set the Input Mode on the textbox to Read Only.

    Thanks. I have the field working now. I had to set the field attribute to "REP_WORKLOG(the relationship name).DESCRIPTION_LONGDESCRIPTION. Now it's working as intended!

    Thank you for the assistance.

    Updated on 2013-06-25T13:39:24Z at 2013-06-25T13:39:24Z by Demonic240