How to set and check a Null or Empty Autocomplete Box in Microsoft Lightswitch?

To set a Null or Empty Autocomplete box I use the code below:

trnShiftChangeEmployee.SundayShiftIdLink = Me.DataWorkspace.hris_360.mstShifts.Where(Function(shift) shift.Id = 0).FirstOrDefault()

The Autocomplete box name is SundayShiftIdLink which is set to mstShifts table with Id=0, which in turn returns an empty recordset.

To check if the Autocomplete box has a Null or Empty value I use the code below:

If Not IsNothing(trnShiftChangeEmployee.SundayShiftIdLink) Then
                        ..

End If

Below is an example screen shot that uses the Null or Empty Autocomplete box.  This application is used to encode the Change Shift of employees.

Advertisements
About

Software developer living in the Philippines.

Posted in Lightswitch
2 comments on “How to set and check a Null or Empty Autocomplete Box in Microsoft Lightswitch?
  1. Organ says:

    Great! Thanks for sharing 🙂

  2. rene prado says:

    As shown on the above datagrid, meaning you had a field from sunday to monday? I’m confused sorry Ive just started studying database theory. thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Author

Harold Glenn P. Minerva
Software Developer / Tech Enthusiast
Living in the Philippines

View Harold Glenn Minerva's profile on LinkedIn

Instagram

Software Engineer - Seasonal and Range Trading Software. Magenta Trader is a powerful stock market visualization software that increases your probability of trading success.

Software Architect and Founder - Easyfis.com is a multi-tenant cloud-based Software-as-a-Service (SaaS) business app that caters to micro, small and medium trading businesses.

CTO and Co-Founder - We give your company the leverage by providing innovative software solutions products such as Point-of-Sales (POS), Financial Information System (FMIS), Payroll and DTR (HRIS), and many more.

%d bloggers like this: