34
Views
3
Comments
Remove empty text value from drop down list
Question
Application Type
Reactive

Hi,

I have a drop-down. I kept empty text as select a value. This empty text appears as a option in drop-down list. I want to show the empty text on the drop-down when no value is selected but it should not show as a option in list. How can I do it?


@Gayathri Gali @Gayathri Gali 

Please elaborate bit more, what is the source of dropdown?

If possible please share your oml or sone snapshots here


Cheers 

Shriyash Dixit

Hey Gayathri ,


Follow the below steps :

1)Create On Ready Event.

2)Create a local variable "DropdownId" type text.

3)In the On ready event drag and drop assign and assign DropdownId = NameOfYourDropdown.Id

(for example name of the dropdown in my case is Dropdown_Name so I have used  DropdownId = Dropdown_Name .Id )

4)After the assign drag and drop a JS.Pass the local varible as a input parameter(In my case "DropdownId").Then paste the following code in  JS


document.getElementById($parameters.DropdownId).firstElementChild.style.display="none"


Please check the attached image before implementing.

Hope this will help you!!!

Thanks & Regards,

Sudip Pal

 


Hello Gayathri,

I have attached OML for this problem you will find it in Test screen,

Kindly have a look,

Hope this helps

Regards,

Komal

TEST.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.