Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Show/Hide Field by clicking on a lookup field button (Javascript)


I need guidance how to write a javascript for the following scenario:


I want to a field to be shown as soon as I click on the lookup field button:







Show and hide of a field is not an issue however I am struggling to reference the click event on the lookup field button since I am new to Javascript.


Any help is much appreciated! Thanks!

Super User II
Super User II

Hi, do you need it on the click of the search? or when the Organisation lookup contains data?

the latter would be the most common I guess, take a look at this thread:


not the same scenario but similar enough, you can simply check if the organisation contains data instead of checking if value is yes/no

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User

Oliver Rodrigues


Helpful resources

PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,961)