Adding components to a new ticket page
Last updated
Was this helpful?
Last updated
Was this helpful?
Navigate to the cpticketmgmt page, and add a new ticket.
On the top-right corner of the cpticketmgmt page, click New Ticket. The Add Ticket dialog box is displayed.
Fill-up the necessary details in the form and click Create.
Refresh the page, and you can now see the newly added ticket as the first entry in the Card Table.
Double-click on the first entry. The new ticket page canvas is displayed.
On the menu bar, click . The components added to the page are saved.
Right-click on the Page component and add separate Data Store components for the following datasources:
CptmCustomerUserMapping
CptmCustomerTickets Select the Auto-Query and Update Allowed checkboxes to inherit and modify the datasource attributes.
Right-click on the CptmCustomerTickets Data Store component and add Trigger on Query.
Add the Show Popup action to the trigger.
Right-click on the Page component and add three Popup components.
In the Properties tab of the Popup component, under General properties, in the Title field, enter Change history.
Change the Title of the second Popup to Notes.
Change the Title of the second Popup to Update Title.
Right-click on the Change history popup and add the Trigger After Popup Open. Add the Query DataSource action to the trigger.
Right-click on the Vertical Section child component of the Notes popup and add a Card Wrapper.
Change the Card Header Title to Internal Comments.
Right-click on the Card Body and add the Collaboration component.
In the Properties tab of the Collaboration component, under General properties, in the Collaboration Datasource Alias, type CptmCustomerTickets.
In the Context field, type Internal Comments.
In the Context Value field, type #{params.ticketId}
In the Date Format field, type DD-MM-YYYY HH:mm
Select the Show Likes, Show Attachments, and Always Show Delete checkboxes.
Add a button to the second Vertical Section of the Notes popup.
Change the Button Title to Close.
Add the Hide Popup action to the trigger.
In the Properties tab of the Hide Popup action, under General properties, in the Popup Item ID field, paste the Item ID of the Notes popup component.
Add a Row component to the Update Title popup.
Add a header component to the Col component, namely, H5.
In the Text field, type Update Title.
Add another Col component to the row.
Right-click and add an Icon component to the column.
Add the Refresh DataSource and Hide Popup actions to the trigger.
In the Properties tab of the Refresh DataSource action, under General properties, in the Target Data Source Alias field, select CptmCustomerTicketsAlias.
In the Properties tab of the Hide Popup action, under General properties, in the Popup Item ID field, paste the Item ID of the Update Title popup component.
On the menu bar, click . The components added to the page are saved.
Right-click on the Page component and add a Vertical Layout Panel component.
In the Properties tab of the Vertical Section component, under General properties, in the Height field, type 0.1.
Add a Card Wrapper to the Vertical Section component.
Delete the Card Header.
Add a Row component to the Card Body.
In the Properties tab of the Rol component, under DataSource properties, select the Use the Existing Data Source checkbox.
In the Data Source Alias field, select CptmCustomerTicketsAlias.
Add a header component to the Col component. For example: H3.
In the Properties tab of the H3 component, under General properties, in the View Attribute field, select Ticket Id. The header component will now display the ticket Id fetched from the datasource.
Add another Col component to the row.
Right-click on the Col component and add a Badge component, to display the status of the ticket.
In the Properties tab of the Badge component, under General properties, in the Text field, enter New.
In the Badge Color field, click Enter Custom and again click Expression Builder. The Expression Builder: Badge Color dialog box is displayed.
In the bottom of the dialog box, in the Expression text box, enter the following expression: decode(#{CptmCustomerTicketsAlias.status},'1','danger','2','primary','3','warning','4','default','5','success')
Click Submit. The expression specifies the badge color according to the status of the ticket.
In the View Attribute field, select Status from the list.
Add another Badge component to the column and in the Text field, enter Status.
To add badge color, repeat step d. The expression specifies the badge color according to the priority status of the ticket.
In the View Attribute field, select Priority from the list.
Add another Col component to the row.
Add a Text Field component to the column.
In the Properties tab of the Text Field component, under Label properties, delete the text in Field Label field.
In the Placeholder field, click. The Expression Builder: Tool Tip dialog box is displayed.
Under Category column, select Datasource.
Under Choose a Datasource Alias column, select CptmCustomerTicketsAlias
Under Choose an Attribute column, select Title.
Click Submit.
Add another Col component, and set the base size, so that the column is displayed in left corner of the page.R
Right-click on the Col component and add the Icon component.
Add a Trigger On Click to the Icon component.
Add the Set as Current StoreRecord and Show Popup actions to the trigger.
Add another Col component to the row
Add a button to the Col component.
In the Text field, enter Ticket Summary. You can select a suitable icon under the Icon field.
Add the Go To Page action to the trigger.
In the Properties tab of the Go To Page action, under General properties, in the Page State field, enter app.cptickets (the page state of the cpticketmgmt page).
Add another button to the Col component, and set the button title as Changes History.
Add the Show Popup action to the trigger.
Add another button to the Col component, and set the button title as Internal Comments.
Add the Show Popup action to the trigger.
Add another button to the Col component, and set the button title as Close.
Add Confirm Message action to the trigger.
In the Properties tab of the Confirm Message action, under General properties, in the Message field, type ‘Do you want to close this ticket?’
Add Update StoreRecord action to the trigger.
In the Properties tab of the Update StoreRecord action, under General properties, in the Target Attribute field, select Status from the list.
In the Value Expression field, type 5.
Add Save DataSource action to the trigger.
In the Properties tab of the Save DataSource action, under General properties, in the Target Data Source Alias field, select CptmCustomerTicketsAlias.
Add Refresh DataSource action to the trigger.
In the Properties tab of the Save DataSource action, under General properties, in the Target Data Source Alias field, select CptmCustomerTicketsAlias.
Duplicate the Close button. The triggers are copied as well.
Change the button title to Re-Open.
In the Message field of the Confirm Message action, type ‘Do you want to re-open this ticket?’
In the Value Expression field of the Update StoreRecord action, type 10.
Add another button to the Col component and set the button title as Save Changes.
Add Update StoreRecord action to the trigger.
In the Properties tab, under General properties, in the Target Data Source Alias field, select CptmCustomerTicketsAlias.
Under Target Attribute, select Status from the list.
In the Value Expression field, click. The Expression Builder: Value Expression dialog box is displayed.
Under Category column, select Datasource.
Under Choose a Datasource Alias column, select CptmCustomerTicketsAlias
Under Choose an Attribute column, select Status.
Click Submit.
In the Enable Condition field, click. The Expression Builder: Enable Condition dialog box is displayed.
Under Category column, select Datasource.
Under Choose a Datasource Alias column, select CptmCustomerTicketsAlias
Under Choose an Attribute column, select Status.
Click Submit.
You have added the components to view the current ticket status.
Right-click and add Vertical Layout Panel to the Vertical Section component.
For clear sectioning of the page, add a Horizontal Layout component to the Vertical Section component. By default, the child component, Horizontal Section, is added.
Add a Card Wrapper to the Horizontal Section component.
In the Title field of the Card Header, type Ticket Comments and set a suitable icon.
To view comments or reviews related to the ticket, add the Collaboration component to the Card Body.
In the Properties tab of the Collaboration component, under Context properties, in the Collaboration Datasource Alias field, select ticketCollaboration.
In Context field, select issueId.
In Date Format field, enter DD-MM-YY HH:mm
Select the Show Likes, Show Attachments, and Always Show Delete checkboxes.
In Context Value field, click. The Expression Builder: Context Value dialog box is displayed.
Under Category column, select Datasource.
Under Choose a Datasource Alias column, select CptmCustomerTicketsAlias
Under Choose an Attribute column, select ticketId
Click Submit.
Under Look & Feel properties, in the Height field, type 1.
Add a Card Wrapper to the Horizontal Section component.
In the Title field of the Card Header, type Ticket Details and set a suitable icon.
Right-click on the Card Body and add a Form component.
In the Properties tab of the Form component, under DataSource properties, select the Use the Existing Data Source checkbox.
In the Data Source Alias field, select CptmCustomerTicketsAlias
Add a Row component to the Form component.
In the Properties tab of the Row component, under DataSource properties, select the Use the Existing Data Source checkbox.
In the Data Source Alias field, select CptmCustomerTicketsAlias.
In the Properties tab of the Col component, under General properties, in the Horizontal Alignment field, select Default.
In the Vertical Alignment field, select Default.
Add the Paragraph component to the Col component.
In the Text field of the Paragraph component, enter Created on.
Add a Date component to the Col component, and place it against the Paragraph component.
In the Properties tab of the Date component, under General properties, in the View Attribute field, select Creation Date.
Add a User Picture component to the Col component., and place it against the Date component.
In the Properties tab of the User Picture component, under General properties, in the View Attribute field, select Creation By. You can change the alignment of individual components or the Row on whole by changing the margin values or Display alignment position.
Duplicate the Col component.
Change the Text value of the Paragraph component to Updated on.
Change the View Attribute of the Date component to Last Update Date.
Right-click on the Row component and add a Text Field component.
In the Properties tab of the Text Field component, under General properties, in the Field Label field, enter Ticket Description.
Under Data properties, in the View Attribute field, select Issue Description.
In the Total lines field, enter 6.
Right-click on the Row component and add a Select component.
In the Field Label field of the Select component, enter Priority.
In the View Attribute field, select Priority.
Under Select DataSource properties, in the DataSource field, select CptmLookups.
In the Data Source Alias field, enter CptmLookupsAlias1.
In the Default Where Clause field, type LOOKUP TYPE=’TICKET_PRIORITY’
In the Order By Clause field, type #meaning#ASC.
In the Value Attribute field, select Lookup Code.
In the Display Attribute field, select Meaning.
Duplicate the Select component.
Change the Field Label value to Ticket Type
Change the Default Where Clause field to LOOKUP TYPE=’TICKET_TYPE’
Duplicate the Select component.
Change the Field Label value to Requested By.
Change the datasource selected in the DataSource field to CptmCustomerUserMapping.
Change the Order By Clause field to #userName#ASC.
In the Value Attribute field, select User Id.
In the Display Attribute, select User Name.
Right-click and add the Trigger Before Select Query.
Add the Set Query Filter Value action to the trigger.
In the Properties tab of the Set Query Filter Value action, under General properties, in the Value Expression field, click. The Expression Builder: Value Expression dialog box is displayed.
Under Category column, select Datasource.
Under Choose a Datasource Alias column, select CptmCustomerTicketsAlias
Under Choose an Attribute column, select customerId.
Click Submit.
Right-click on the Requested By Select component and add the Trigger Before Render.
Add the Query DataSource action to the trigger.
In the Properties tab of the Query DataSource action, under General properties, select the Force checkbox.
In the Properties tab of the Query Param action, under General properties, in the Value Expression field, click. The Expression Builder: Value Expression dialog box is displayed.
Under Category column, select Datasource.
Under Choose a Datasource Alias column, select CptmCustomerTicketsAlias
Under Choose an Attribute column, select customerId.
Click Submit.
In the Param Attribute field, select Customer Id.
In the Filter Type field, select =.
In the Data Source Alias field, select the Item Id of the datasource added to the Select component.
Duplicate the Select component.
Change the Field Label value to Assigned To.
Change the datasource selected in the DataSource field to CptmCustomerUserMapping.
In the Value Attribute field, select User Id.
In the Display Attribute, select User Name.
Right-click on the Assigned To Select component and add the Trigger Before Render.
Add the Query DataSource action to the trigger.
In the Properties tab of the Query DataSource action, under General properties, select the Force checkbox.
In the Data Source Alias field, select the Item Id of the datasource added to the Select component.
In the Properties tab of the Query Param action, under General properties, in the Value Expression field, click. The Expression Builder: Value Expression dialog box is displayed.
Under Category column, select Datasource.
Under Choose a Datasource Alias column, select CptmCustomerTicketsAlias
Under Choose an Attribute column, select customerId.
Click Submit.
In the Param Attribute field, select Customer Id.
In the Filter Type field, select =.
Similarly, add components for the following ticket details:
Component name
Ticket details
Text Field
Application URL
Text Field
User Name
Text Field
Password
Text Field
Ext Ticket Number
Text Field
Available on Build
LOV
Application Name
Date Field
Planned Resolution Date
Date Field
Actual Resolution Date
Text Field
Justification
Text Field
Root Cause Analysis
Text Field
Customer-Specific Tags
On the menu bar, click . The components added to the page are saved.
On the menu bar, click . The components added to the page are saved.
14. On the menu bar, click . The components added to the page are saved.
15. To view the page functionalities, on the menu-bar, click . You can now access the page with all the defined functionalities.