Dashboards & Visualizations

How to troubleshoot: Getting duplicate values causing conflict error

Digvijay
Path Finder

Hello Splunk Experts ,

 

I have following dashboard 

Digvijay_0-1656320944960.pngDigvijay_0-1656320944960.png

 

I want to filter dropdown "Select Operation" on basis of API and Method dropdown selection ,but I am getting 'duplicate values causing conflict' error.

Below is my code :

 

<input type="dropdown" token="token_service" searchWhenChanged="true">
<label>Select API:</label>
<choice value="party_interaction_rest">PARTY INTERACTION</choice>
<choice value="ticket_mgmt_rest">TICKET MANAGEMENT</choice>
<choice value="customer_management_rest">CUSTOMER MANAGEMENT</choice>
<choice value="agreement_management_rest">AGREEMENT MANAGEMENT</choice>
<choice value="product_order_rest">PRODUCT ORDER</choice>
<choice value="cust_comm_rest">CUSTOMER COMMUNICATION</choice>
<choice value="product_inv_rest">PRODUCT INVENTORY</choice>
<change>
<condition label="PARTY INTERACTION">
<set token="sourcetyp">$value$</set>
<set token="src">http:party_interaction_rest</set>
<set token="uuid">"properties.o2-PartyInteraction-ReqId"</set>
</condition>
<condition label="TICKET MANAGEMENT">
<set token="sourcetyp">$value$</set>
<set token="src">http:ticket_mgmt_rest</set>
<set token="uuid">"properties.o2-TroubleTicket-ReqId"</set>
</condition>
<condition label="CUSTOMER MANAGEMENT">
<set token="sourcetyp">$value$</set>
<set token="src">http:customer_management_rest</set>
<set token="uuid">"properties.o2-CustomerManagement-ReqId"</set>
</condition>
<condition label="AGREEMENT MANAGEMENT">
<set token="sourcetyp">$value$</set>
<set token="src">http:agreement_management_rest</set>
<set token="uuid">"properties.o2-Agreement-ReqId"</set>
</condition>
<condition label="PRODUCT ORDER">
<set token="sourcetyp">$value$</set>
<set token="src">http:product_order_rest</set>
<set token="uuid">"properties.o2-ProductOrder-ReqId"</set>
</condition>
<condition label="CUSTOMER COMMUNICATION">
<set token="sourcetyp">$value$</set>
<set token="src">http:cust_comm_rest</set>
<set token="uuid">"properties.o2-Communications-ReqId"</set>
</condition>
<condition label="PRODUCT INVENTORY">
<set token="sourcetyp">$value$</set>
<set token="src">http:product_inv_rest</set>
<set token="uuid">"properties.o2-Product-ReqId"</set>
</condition>
</change>
<default>ticket_mgmt_rest</default>
<initialValue>ticket_mgmt_rest</initialValue>
</input>
<input type="dropdown" token="token_method" searchWhenChanged="true">
<label>Select Method:</label>
<fieldForLabel>METHOD</fieldForLabel>
<fieldForValue>METHOD</fieldForValue>
<search>
<query>| makeresults | eval API="party_interaction_rest",METHOD="Alle,GET,POST" |
append [| makeresults | eval API="ticket_mgmt_rest",METHOD="Alle,GET,POST,PATCH"] |
append [| makeresults | eval API="customer_management_rest",METHOD="Alle,GET,PATCH"] |
append [| makeresults | eval API="agreement_management_rest",METHOD="Alle,GET"] |
append [| makeresults | eval API="product_order_rest",METHOD="Alle,GET,POST,PATCH,DELETE"] |
append [| makeresults | eval API="cust_comm_rest",METHOD="Alle,GET"] |
append [| makeresults | eval API="product_inv_rest",METHOD="Alle,GET,POST,PATCH"] | eval METHOD=split(METHOD,",")
|mvexpand METHOD| table API METHOD | search API="$token_service$"</query>
</search>
<change>
<condition value="Alle">
<set token="token_method">*</set>
</condition>
</change>
<default>Alle</default>
<initialValue>Alle</initialValue>
</input>
<input type="dropdown" token="tkn_ OPERATION">
<label>Select Operation:</label>
<fieldForLabel>OPERATION</fieldForLabel>
<fieldForValue>OPERATION</fieldForValue>
<search>
<query>| makeresults | eval API="party_interaction_rest" , METHOD="GET",OPERATION="Alle,LIST_PARTY_INTERACTIONS" |
append [| makeresults | eval API="party_interaction_rest" , METHOD="POST",OPERATION="Alle,RETRIEVE_PARTY_INTERATION,CREATE_PARTY_INTERATION"] |
append [| makeresults | eval API="ticket_mgmt_rest" , METHOD="GET",OPERATION="Alle,LIST_TROUBLE_TICKETS"] | eval OPERATION=split(OPERATION,",")
|mvexpand OPERATION| table API METHOD OPERATION | search API="$token_service$" METHOD=$token_method$ </query>
</search>

 

 

 

Labels (1)
Tags (2)
0 Karma

nadlurinadluri
Communicator

Is there a reason why you have used the below condition check for the "METHOD Dropdown"?

 

<change>
<condition value="Alle">
<set token="token_method">*</set>
</condition>
</change>

 

If you just need to have the token of METHOD to be passed to "Operation" dropdown , delete the above piece of code as you dont need to have it. Once done you should be able to see the results as expected.

ISSUE

As you are using * as the token output for Method=Alle, you are seeing multiple values for 'Operation' dropdown. Removing the above piece of code should help in resolving it.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Free Professional Services for .conf26 Attendees

This year at .conf26, we are doing something a little different. We are bringing the best minds from ...

Defend at Machine Speed: Your Guide to Security Sessions at .conf26

Splunk .conf26   With threats moving at machine speed and attack surfaces expanding across hybrid ...

Where Innovation Takes Flight: The Splunk4Aviation Flight Sim Lands at .conf26

If you hear someone at .conf26 shouting "gear down, GEAR DOWN" across the show floor, you have found us.  The ...