Hi Harry
I could import your demo and my solution works as well, now. Thanks a lot!
Still some thoughts are left I am not sure about the answer:
-
I used (in my first trial) the line var foundset = databaseManager.getFoundSetUpdater(foundset); This returns null, because of the variable name foundset. In the list of resered words (Servoy, JS), foundset is not listed. I am wondering why I can’t use the variable name foundset? Is it a reserved word but not listed?
-
Is there really a good reason to not make the behaviour of the radio button the same as the check box if no value list is attached, i. e. just display the active radio button if there is a 1 set? We simulate this behaviour now with the “1 value list”.
-
I can’t figure out what’s the difference between getting a foundset with getFoundSet and getFoundSetUpdater? In the first case the description in the DevRefGuide says what we get, for the second stmt it’s described for what it can be used!?
-
May be I just realized it with this example, but attaching the method to the radio buttons onAction event doesn’t trigger the method, whereas attaching it to the onFocusGained does!? I have to mention here that the radio button field is a calculated field according to the matching of the foreign key and primary key of the (foundset) relationship, which is slightly different from the demo example.
If anyone can shed some light I am very thankful, regards, Robert
Harry Catharell:
Hi Robert,
If you managed the rename to ‘radio_flag.servoy’ then in your import solution dialogue you have the option to choose for all filetypes which should then allow you to choose that file even though it may think it is still a ‘zip’ file.
Harjo is right, though, that some machines will assume that the download is a zip file and unzip it to give you the raw contents ![Evil or Very Mad :evil:]()
Exported Servoy solutions are basically zip files anyway
If this still causes you a problem then email me off forum and I’ll reply direct to you with the export as an attachment which may work better.
Cheers
Harry
Hi Robert,
Can’t answer all questions but can give you opinions on some ![Smile :)]()
Robert Huber:
- I used (in my first trial) the line var foundset = databaseManager.getFoundSetUpdater(foundset); This returns null, because of the variable name foundset. In the list of resered words (Servoy, JS), foundset is not listed. I am wondering why I can’t use the var foundset? Is it a reserved word but not listed?
Seems to me that it has a problem because the ‘foundset’ word must be recognised inherently as a function in Servoy
Robert Huber:
- Is there really a good reason to not make the behaviour of the radio button the same as the check box if no value list is attached, i. e. just display the active radio button if there is a 1 set? We simulate this behaviour now with the “1 value list”.
Generally, I think that we are lucky to be able to get away with the checkbox NOT needing a value list - most other dev environments all seem to NEED a value list for both radios and checks - YMMV
Robert Huber:
- I can’t figure out what’s the difference between getting a foundset with getFoundSet and getFoundSetUpdater? In the first case the description in the DevReeefGuide says what we get, for the second stmt it’s described for what it can be used!?
Key difference as far as I can see is that the updater allows you to work on the complete foundset object in a single pass whereas getFoundSet requires that you cycle through each row index
Robert Huber:
- May be I just realized it with this example, but attaching the method to the radio buttons onAction event doesn’t trigger the method, whereas attaching it to the onFocusGained does!? I have to mention here that the radio button field is a calculated field according to the matching of the foreign key and primary key of the (foundset) relationship, which is slightly different from the demo example.
I recall that it works through onAction if the field is set as editable but works through onFocusGained whether it is or not ! You could have a clear button placed over the radio flag field which would then work on the onAction !?
Cheers
Harry
Hi Harry
Harry Catharell:
Hi Robert,
Can’t answer all questions but can give you opinions on some ![Smile :)]()
Robert Huber:
- I used (in my first trial) the line var foundset = databaseManager.getFoundSetUpdater(foundset); This returns null, because of the variable name foundset. In the list of resered words (Servoy, JS), foundset is not listed. I am wondering why I can’t use the var foundset? Is it a reserved word but not listed?
Seems to me that it has a problem because the ‘foundset’ word must be recognised inherently as a function in Servoy
I agree, and therefor it should be in the list of reserved words, shouldn’ it?
Harry Catharell:
Robert Huber:
- Is there really a good reason to not make the behaviour of the radio button the same as the check box if no value list is attached, i. e. just display the active radio button if there is a 1 set? We simulate this behaviour now with the “1 value list”.
Generally, I think that we are lucky to be able to get away with the checkbox NOT needing a value list - most other dev environments all seem to NEED a value list for both radios and checks - YMMV
But Servoy claims they are better ![Smile :-)]()
Harry Catharell:
Robert Huber:
- I can’t figure out what’s the difference between getting a foundset with getFoundSet and getFoundSetUpdater? In the first case the description in the DevReeefGuide says what we get, for the second stmt it’s described for what it can be used!?
Key difference as far as I can see is that the updater allows you to work on the complete foundset object in a single pass whereas getFoundSet requires that you cycle through each row index
This is how it looks like, but for both commands one gets an object, so I still don’t see clearly the difference.
Harry Catharell:
Robert Huber:
- May be I just realized it with this example, but attaching the method to the radio buttons onAction event doesn’t trigger the method, whereas attaching it to the onFocusGained does!? I have to mention here that the radio button field is a calculated field according to the matching of the foreign key and primary key of the (foundset) relationship, which is slightly different from the demo example.
I recall that it works through onAction if the field is set as editable but works through onFocusGained whether it is or not ! You could have a clear button placed over the radio flag field which would then work on the onAction !?
Yes, you are right, that’s it, seems a bit unlogical to me, but may be there is a reason.
Harry, thanks again and best regards, Robert
Hi Harry
It seems that .performUpdate(); already saves the changes into the database, i. e. there is no databaseManager.saveData(); needed. Have you made the same experience?
Regards, Robert
Hi Robert,
I admit to not knowing this.
I had the original form in a tab several related layers deep so had the savedata & updateUI in to refresh the view (I think that autosave was also being used then too ?) - and it was done some time ago now so the code has just stayed as it was ![Laughing :lol:]()
Thanks for the valuable feedback ![Smile :)]()
Cheers
Harry
Hi Harry
It’s on my side to thank you for the support you gave me! Things change quite fast and very often it’s not so clear what is really needed, as the manuals usually don’t go very deep, for example saying if performUpdate really saves data into the db or if additionally saveData is needed. I wish there would be more of these sort of info.
Thanks and regards, Robert
Harry Catharell:
Hi Robert,
I admit to not knowing this.
I had the original form in a tab several related layers deep so had the savedata & updateUI in to refresh the view (I think that autosave was also being used then too ?) - and it was done some time ago now so the code has just stayed as it was ![Laughing :lol:]()
Thanks for the valuable feedback ![Smile :)]()
Cheers
Harry