Trying to show a foundset of records - after a search - in a portal using relationship based on PK of found records.
In FM can just copy all found record ID’s into text field and use this as left side of relationship. However Servoy PK’s are integer and I can’t get relationship to work - do I need to have a second key that’s text ??
Servoy usually has a feature thats easier than the workaround but I can’t seem to find it on this one.
to make sure that i understand you:
you want the search results of one form to be displayed in another form as a portal?
Why don’t you use a tab that has no relation in that other form and set the results in that tab of the search.. (the form displayed in the tab can be a tableview so you have youre portal)
in RC3 you will be able to do a few more things with foundset like:
global.markpk = yourefoundset ;
the pk’s will be stored in the global, global can also be a record dataprovider so you can store them
and then back:
var foundset = databaseManager.convertToDataSet(global.markpk);
but this has a limitation of around 200+ records (depending on database)
and you can convert one foundset to another f oundset with a relation (so going from one table to another table)
var convertedFoundSet = databaseManager.convertFoundSet(foundset,contributions_to_people);
forms.peopleform.controller.showRecords(convertedFoundSet);
Thanks for reply. I am trying to ensure that after a user has been looking at other tables/databases they can return to the original record in the first database.
ie
Have main Contacts form with tab-panel containing Notes & Table tabs all using ‘Dataproviders’ as source
User selects a record from the Table tab and details show in main form and Notes tab
After looking at other tables/databases - Finance/Parts etc - they return to Contacts but the record being shown is the first one in the Table tab. I want it to be the record they were veiwing - which might be the 2nd/5th etc etc.
Tried a variety of relationships etc (digging an ever deeper hole !!) and thought that using a Portal might solve the problem.
Haven’t been able to use rc1/rc2 on Mac due to screen refresh problems hope sorted on rc3.
Can’t you make the Table tab a non related tab that just shows the foundset you want? And if you have other form that are also build on the same as the Table tab then make sure that the Table tab form has s seperate foundset…
then the foundset you have in the table tab will always keep the current set and the selection.. (if that is not the case then it is a bug, send over a solution that demonstrates that)
How do I currently show a related found set based on the current found set. It seems like the above code is going to do what I need but I have a found set of 5 records showing and I want to show a related found set where those 5 records may relate to many other records.
How do I currently show a related found set based on the current found set. It seems like the above code is going to do what I need but I have a found set of 5 records showing and I want to show a related found set where those 5 records may relate to many other records.
I’ve recently tried using the convertFoundSet() function and I get the following.
On a form with two records and a valid relationship.
var fs = databaseManager.convertFoundSet(foundset, mag_subs_to_mag_group_membership);
application.output(fs);
returns
null
which precludes
var fs = databaseManager.convertFoundSet(foundset, mag_subs_to_mag_group_membership);
forms.subsMemberships.controller.showRecords(fs);
from functioning properly. Please advise about this feature and how to get it to work. I have to create two hops to get back to a found set in Table 1 where I am coming from Table 3 and jumping to a found set in Table 2 and finally jumping to Table 1’s found set.