# How can i write SQL inside the Client event

**URL:** <https://forum.radsystems.io/t/how-can-i-write-sql-inside-the-client-event/1448>\
**Category:** PHPRad Classic\
**Created:** [March 10, 2023, 3:10pm UTC](https://forum.radsystems.io/t/how-can-i-write-sql-inside-the-client-event/1448 "2023-03-10T15:10:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bram](https://forum.radsystems.io/letter_avatar_proxy/v4/letter/b/9d8465/32.png) [@bram](https://forum.radsystems.io/u/bram)\
**Post date:** [March 10, 2023, 3:10pm UTC](https://forum.radsystems.io/t/how-can-i-write-sql-inside-the-client-event/1448/1 "2023-03-10T15:10:57Z")

</div>

I have the master detailed form that i need to get the prices textfield autopopulated upon selecting the product name. Here is the screenshot

 ![question](https://forum.radsystems.io/uploads/default/original/1X/9313edf77cd4e7690b4210f0379130f8ebad348f.png)

---

<div class="post-metadata">

**Author:** ![willvin](https://forum.radsystems.io/user_avatar/forum.radsystems.io/willvin/32/7_2.png) [@willvin](https://forum.radsystems.io/u/willvin)\
**Post date:** [March 12, 2023, 1:13pm UTC](https://forum.radsystems.io/t/how-can-i-write-sql-inside-the-client-event/1448/2 "2023-03-12T13:13:17Z")

</div>

Use the “Auto Complete Data Source”

 ![image](https://forum.radsystems.io/uploads/default/original/1X/b9dd0f9eb63e5d8174a756462116e2685b6fb23f.png)
