Q: Is it possible to add a new property to the properties list in the form designer? E.g. a property called “useForFind” for a field?
Why: In find mode a field can only be entered if it is set to editable. But we would like to let the user also search in non editable fields. Our workaround: Set all fields to editable. OnShow command disable non editable fields. OnFind command enable search fields and onSearch command disable them again.
I thougt, if I could ask a field for useForFind, I could easier manage the states.
we anticipated on this by having ‘property-code’ in the name convention of our elements.
for example:
we prefix our element names like ‘fld_’ / ‘chk_’ / ‘tp_’.
we extend the prefix with ‘s_’ for elements with dataprov. where you can search on, ‘e_’ for elements that are ‘opened up’ in edit mode. Extension ‘se_’ would mean a user can do both.
we’ve created just one global method that handles the ‘mode’ of the application, depending on the mode, the various elementsproperties like readonly are set.
First of all, thank you for posting this idea. I’m glad to hear that others step into the same problems. And yes, maybe that will be the best way for us to go. We’ll have to discuss this in the team.
On the other hand: This would only be a workaround since the tool does not offer enough support here, right? Any ideas from the Servoy side?
If anybody still knows how to extend the properties list, I’d be very interested to “hear”.
I really didn’t know that in find mode a field can only be entered if it is set to editable. For some reason I expected the editable property to affect the edit entry mode only. Anyway, I think that this idea about the useForFind property should be a feature of the next release. It’d be a nice token from Servoy
In general, anytime one is “forced” to think about to code some information into a pre or postfix, it’s an indication that the explicit possibility to define the desired info is missing. Therefor I also vote for an additinal property, or, changing the editable property to not implicitly put some search property information into the edit(able) property - as the property name suggest it’s for edit purposes.