
Hi,
Many a times we come across a scenario where customer asks to filter out the data based on certain fields which are configured as Extension fields (SDK fields) with preconfigured queries on OWL screen. This blog will demonstrate how we can achieve this.
There can be 2 such scenarios:
Let’s deep down into the process below:
Case -1: Enabling a Custom Field in Advanced Search of Standard OWL screen.
Let’s say we have a custom field - “Type” which indicates whether the ticket is B2B or B2C and now we have to add it in advanced Filter of Service Request’s OWL screen and save the Search Query so that the User will be able to filter out only B2B tickets or B2C tickets based on the requirement.
Follow the below steps to achieve the same.
Step 1: As Service Request is a standard BO, Create an Extension BO of it in SDK and Add your extension field ZCOD_Type (Type) in the Ticket.xbo as shown below.
TypeCode is the data type which is a codelist having 2 values – B2B and B2C based on which we are going to query the Ticket.
Step 2: Enhance the Screen of your Extension BO to add our field- “Type” on TI screen. You will be able to see the field added on UI.
Step 3: Now, you need to Add your Field to Advanced Search in Tickets OWL Screen.
To do that, follow the below steps.
i. Right click on Ticket.xbo you have created, and Select Enhance Enterprise Search as shown below.
ii. A dialog box will be displayed as below. Select the field that you want to add in advanced search and click OK.
iii. On Click of OK, you will be directed to the UI Screen but as a pre-requisite please make sure you login into UI System with the same SDK credentials that you used to login to SDK.
iv. Select the Row and click on Add Field. Check box - “Field available” will be Automatically set to true on click of Add Field.
v. Go to SDK, Select the Ticket.xbo and enhance Screen as shown below.
vi. Select the screen in which you want to add the field on UI.
You can see Screen got added in the project.
vii. Open it and select “Advanced filter” inside Extensibility Explorer and select “Add Extension field to section group” as shown below.
viii. Select the field and click “Apply”.
ix. Save and activate the screen.
Now, Refresh the Front-end UI, you will be able to see the field added in Advanced Filter.
Step 4: Select the value and click on Save as Query.
Note: You can do it in Adaptation mode to reflect the Change in Everyone’s system.
Dialog will be displayed, give the name for the query, and save.
You will be able to see it in the Queries.
You can Repeat Step 4 to save as many Queries as you need for all the required values.
Case 2: Enabling a Custom Field in Advanced Search in Custom OWL screen.
If you want to achieve the similar functionality as above where you want to enable any custom field in the custom BO in advanced filter of OWL screen, below is the Process.
Create a Custom BO and create the required field, create screens for your custom BO and enable the field in advanced search of OWL.
Let us now see the steps in detail achieve the requirement.
Let’s say, we have a custom BO named as Vehicles.bo in which you want to filter out vehicles based on 2 wheelers or 4 wheelers.
Step1: Advanced filter needs to be added on our custom OWL Screen. To do this, In SDK, go to “Designer” and click on “Advanced” option at top right corner as shown below.
A pop-up below will be shown, click on Yes.
Step2: Now go to “Controller” -> Queries.
Open Query ->Query by Elements, select the fields and move them to the Selected Query Parameters section as shown below.
Step3: Now go to “Data model” and add data fields inside SearchParameter1 as required.
Step 4: Go to “Controller” again and bind the elements in Selected Query Parameter section with the elements in Data Model by selecting the fields. Please refer below screenshot for the same.
Step 5: Go to Designer, Drag and Drop the required fields from Data model into the designer as below.
Step 6: Save and Activate the Screen.
Refresh the Front-end UI and you can see advanced filter button added on the screen.
Step7: Click on Advanced Filter Option and give the Vehicle type selection and click on “Go”. You will be able to see filtered entries only.
Thank You for visiting this, Blog.
Hope it helps you understand how to add your custom fields in the Advanced Filter on UI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.