I currently have a foundset of more than 1 record. I want to set a field in any of the other records (doesn’t matter which). In FMP a suitable technique would be to omit the current record, then set the field (taking effect in whatever record is now current). Nothing more complicated than that.
Not so in Servoy. Setting the field doesn’t take effect. Here’s the code that doesn’t work.
var count = foundset.getSize();
application.output('current count = ' + count); // = 6
controller.omitRecord();
pref_com = 1; // setting the required field
In an attempt to grab the attention of the current record I’ve tried and failed with this variation:
var count = foundset.getSize();
application.output('current count = ' + count); // = 6
controller.omitRecord();
var ix = foundset.getSelectedIndex();
foundset.setSelectedIndex(ix);
pref_com = 1; // setting the required field
It simply brings back the omitted record. Anyone have recommendations?
Absolutely bizarre!! Put the identical code into the actual solution and it goes back to showing a full count right after returning “true” for omitting a record.
In the meantime I’ve thought of and successfully tested an alternative route to my desired result.