I am currently working on a web app where I need to perform some server side data retrieval.

While referencing SQLLOOKUP, when the virtual table is used, the return value is the customer id.

Is it possible to have multiple returned values?
For example, can the return value be customerid and employeeid.

If it is not possible, other than calling SQLLOOKUP() several times, what would be the best way to use the same functionality with virtual tables?
I am trying to make a call to a virtual table that returns two columns from a table.
I would then taken the values, place them in a JSON string format and return the encoded object to the client.

I am currently using two sqllookup calls and I’m trying to make it easier with one single call.

m_defbranch = sqllookup("vtsecure","where loginname = '" + m_username + "'", "","defbranch","'Not found'")

m_colcode = sqllookup("vtsecure","where loginname = '" + m_username + "'", "","collcode","'Not found'")

I am storing each of the values in the caption of a label in a canvas section for other uses (which will not be visible to the user).
The easiest nocode way I can think of: put a canvas section on the page that is invisible.
two textboxes on the section set to the two fields you want to use.
Set the
datasource to be a VT which will give you the values you want.

When you need to requery() (here’s another place where having all the details would make a difference), set the WHERE attribute of the section..
I’m not sure if it will
requery itself, or where you will then have to requery the section. One way or the other, your two values will be available for you to use as you need.


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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.