Searching through an unrelated foundset?

Home for older / inactive topics

Searching through an unrelated foundset?

Postby johann.agcanas » Fri Oct 11, 2013 6:22 am

Hi,

I'm trying to create a record in a table while attempting to validate it through another table's record. I'm not sure if I'm doing it correctly.
The scenario is this. I have two tables, A and B. I need a new record in A, but need to check if a record in B exists for the foreign key that I input. How is this done in Servoy Mobile? Normally I would just create another foundset and do a find, but for some reason I cannot access any other foundsets in mobile.

What I'm currently attempting to do is create another foundset and search through it, but it's not working:
Code: Select all
var customers = databaseManager.getFoundSet('db:/server/b_table');

Chrome debug shows some object that has an array of stuff but it's very different from the object I get from var customers = foundset;. Also, creating a foundset from the form's datasource always has a 0 size, despite the foundset object (which contains the form's datasource's records) contains the correct records.
johann.agcanas
 
Posts: 5
Joined: Thu Sep 26, 2013 2:40 am

Re: Searching through an unrelated foundset?

Postby swingman » Mon Oct 14, 2013 7:02 pm

Sorry, I realise that I did not read you question properly....
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1479
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: Searching through an unrelated foundset?

Postby jcompagner » Wed Nov 27, 2013 5:36 pm

var customers = databaseManager.getFoundSet('db:/server/b_table');
customers.loadAllRecords()

that should load all the customers, i think by default it is empty
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8872
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Archive

Who is online

Users browsing this forum: No registered users and 2 guests

cron