Setting Up Pseudo Columns with LightSwitch.

There are a number of ways that you might want to refine your query results that are difficult to do with current table columns; pseudo columns can greatly simplify this. This example shows how to set up a connection using any of the RSSBus ADO.NET data providers and how to expose pseudo columns.

First install the RSSBus product(s) you have purchased. After running the setup, open an instance of Visual Studio LightSwitch. In this tutorial we will make a C# LightSwitch application with the Salesforce Data Provider.

What are pseudo columns?

Pseudo columns are used in WHERE clauses just like regular columns but are not present in any table. As an example you could create a SELECT statement with a psuedo column like this:

SELECT * FROM Accounts WHERE maxresults='10'

Passing the pseudo columns to the data provider allows for more granular control over the rows that get returned. Since they are special entities for Tables and Views they do not exist in the data table returned and cannot be read. For a list of the pseudo columns available with a particular Table or View confer with the help file supplied with the RSSBus Data Provider. The pseudo columns are not available by default however so the rest of this tutorial will show you how to add them into your project.

Setting Up a LightSwitch Project

  • Step 1: Go to File -> New -> Project (or Ctrl+Shft+N) and select a LightSwitch application as shown in the photo.



  • Step 2: Right Click on the "Data Source" folder of the project and select to add a new source

    Then select a Database application:

  • Step 3: In the Connection Properties Wizard enter your credentials; in this case since we are connecting to Salesforce you will need to put in your user name, password, and access token. To expose the pseudo columns all you need to do after this is enter *=* in the Pseudo Columns tabs found under Misc:

  • Step 4: Next Select what Tables and Views you wish to expose, here Accounts was selected.

After this if you need more help setting up a LightSwitch Screen, we have another Knowledge Base entry that shows you how to do this here. Once you have created a Screen you can now query from the available columns and pseudo columns.

Using the Pseudo Columns

  • Step 1: Once you have created the screen you will see an Edit Query link on the designer page; click on this link.

  • Step 2: Select Add Filter from the Filter section and select from the available column and pseudo columns you can query against:

That's it!

That is all it takes to set up a project that uses pseudo columns. This procedure common among all RSSBus Data Providers and additionally can be used to expose pseudo columns with Entity Framework projects.

If you have any further questions about this you can email our support team.