How to set default values for search screen parameters in LightSwitch
I recently tried to set default values for my search screen parameters but didn’t find any option. But here is an easy way to do.
Goto code view of you Search Screen and type the following code. I had 4 parameters which I wanted to initialize with some default values. You can use_Created Event for that.
Namespace LightSwitchApplication Public Class SearchOrdersSearchQuery Private Sub SearchOrdersSearchQuery_Created() Me.OrderStartDate = "1/1/1997" Me.OrderEndDate = "1/1/2001" Me.OrderEmployeeID = "3" Me.OrderCustomerList = "ALFKI,VINET" End Sub End Class End Namespace
Leave a Reply
You must be logged in to post a comment.