I wanted to get selected value from custom dropdown in ticket page

Team,
Im working on an app in which I wanted to support custom dropdowns. based on the option user select in the custom dropdown I have to populate a few details in the custom application that add in the sidebar. but I couldn’t find any way to pull the custom dropdown selected option or any event.
Can someone help me with this?

Would you not be able to use the ticket.propertiesUpdated? :thinking:

1 Like

@Thomas_Haitsma thanks for the response.

as per my understanding ticket.properties updated gives me the ticket field options alone (if the ticket status is modified to completed or opened). what is actually needed is. I have a custom dropdown let’s say country. Now if the user changes from India to Japan I wanted to get Japan now.

Also when the ticket page loads I need to get what current option is selected in the custom dropdown.

I see! Yeah, as far as I know there is not a way to asses the value of a drop-down before the update button is pressed when changing the value.

For the second use case however, you can use the data method to get the ticket details: Data Methods

When this is usable however depends on what sort of app you have. For a ticket background app for example you could do this on page load (onAppActivtedEvent). However, if you have a ticket side we app this onAppActivatedEvent would only be triggered when you open the app.

thanks for the response @Thomas_Haitsma now I can populate the customer dropdown field values.

But along with that if I change the custom dropdown option then also I wanted to get the present selected value from it.

I used ticket.typechanged event but that triggers only when the ticket type changes.

can you please guide me with this?

Hi @sstudio

As per documentation: Events Methods, you can only be notified by changes in these default fields:

So see if this would work for your usecase:

  • Create the “Country” select in your app, so you have total control.
  • Create the ticket custom field “Country” as text type and make it readonly - you can make it readonly using the Interface Method: Disable Ticket Property Fields.
  • Whenever you change the select in your app or when the update ticket properties button is clicked, you can set the value from select to the custom field on the ticket using the API.

This way you can have the outcome that I think you want: to have the country in your ticket fields.

1 Like