cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to customize Enum Type Name:Document Ownership Enum in Enumeration data type

Former Member
0 Likes
339

Hi Experts,

In query filters prompts if i have selected data type as Enumeration and Enum Type Name as Document Ownership Enum for one filter then in

My requirement is i want to add my custom vlaue 'Creator' to this Document Ownership Enum value list.

If anyone have idea about this please reply.

Thanks in advance.

Regards,

Lava

Accepted Solutions (1)

Accepted Solutions (1)

kushagra_agrawal
Active Participant
0 Likes

Hi Lava,

It is Standard and new field in the standard class cannot be added.

Please find the screenshot:

Former Member
0 Likes

Hi Kushagra,

Thanks for your reply.

Do you have any idea as where do we get the values in the drop down Enum Type Name values?

I have checked VLV but that list is not coming from VLV.

Thanks,

Lava

former_member207877
Active Participant
0 Likes

Hi Lavan,

If you Open the Reference Guide, you can observe that it is divided in to two parts.

They are,

1.Class List

2.Enum List

And all the Enum types which you are looking for will be listed under Enum List.

You can use any of them them in your filter paramaeters with Enum Dispay Names.

Hope this helps.

Thanks,

Raj.

Former Member
0 Likes

Hi Rajshekhar,

Thanks for your reply.

I am able to see the enum class list.

Do you have an idea as can we create custom enum class?

Thanks,

Lava

Answers (1)

Answers (1)

Former Member
0 Likes

Rajshekhar-

If I understand what you are attempting correctly, I've done something similar by defining a Value List, then adding a filter field with a source of the value list.

Then in the SQL WHERE clause check if the filter combo selection matches link the conditions like shown in the sample code below.  This code saves allows the user to choose "Supplier Name contains" or "Supplier ID" from a drop down filter called SupplierText.   Then it structures the WHERE condition so each condition with this pseudo logic:  If the selection matches an option and the specific logic matches, then include the record.

Real example:

WHERE

(

/* SUPPLIER */

  <%?(SupplierText)%> =

   ( /* VALUE LIST VALUE OBJECT ID */

   SELECT MIN(VLV.OBJECTID)

   FROM

    <%SCHEMA%>.FCI_MAS_VALUE_LIST_TYPE VLT

   LEFT JOIN

    <%SCHEMA%>.FCI_MAS_VALUE_LIST_VALUE VLV

   ON (VLT.OBJECTID=VLV.PARENT_OBJECT_ID)

   WHERE

   VLT.EXTERNAL_ID LIKE 'custom-ins_status_search_supplier_text'

   AND VLV.DISPLAY_NAME_ID LIKE

    'custom$ins_qry.check_req_ins_as_of.filter_supplier_text_combo_namecontains'

   )

  AND

  REGEXP_REPLACE(UPPER(T1.DISPLAY_NAME),

     '[[:space:]]|[[:punct:]]') LIKE '%'

     || REGEXP_REPLACE(UPPER(<%?(SupplierTextValue)%>),'[[:space:]]|[[:punct:]]')

     || '%'

)

OR

(  /* SUPPLIER ID */

  <%?(SupplierText)%> =

   ( /* VALUE LIST VALUE OBJECT ID */

   SELECT MIN(VLV.OBJECTID)

   FROM

    <%SCHEMA%>.FCI_MAS_VALUE_LIST_TYPE VLT

   LEFT JOIN

    <%SCHEMA%>.FCI_MAS_VALUE_LIST_VALUE VLV

   ON (VLT.OBJECTID=VLV.PARENT_OBJECT_ID)

   WHERE

   VLT.EXTERNAL_ID LIKE 'custom-ins_status_search_supplier_text'

   AND VLV.DISPLAY_NAME_ID LIKE

    'custom$ins_qry.check_req_ins_as_of.filter_supplier_text_combo_supplierid'

   )

  AND

   (

   REGEXP_REPLACE(UPPER(T1.SUPP_ERP_ID),

    '[[:space:]]|[[:punct:]]') LIKE '%' || REGEXP_REPLACE(UPPER(<%?(SupplierTextValue)%>),

    '[[:space:]]|[[:punct:]]') || '%'

   OR

   REGEXP_REPLACE(UPPER(T1.SUPP_SOURCING_ID),

    '[[:space:]]|[[:punct:]]') LIKE '%' || REGEXP_REPLACE(UPPER(<%?(SupplierTextValue)%>),

    '[[:space:]]|[[:punct:]]') || '%'

   )   

)

  

)

Also, by the way, the REGEXP_REPLACE statement is structured to do a "Contains" search, ignoring punctuation and spacing.    Then second condition in the OR checks the text typed against 2 fields and will return the record if either matches.

If you need more info, just let me know.

HTH,
Mike