Where functions currently expect either text strings OR data references, they should be able to accept text strings, data references or the text strings/data references returned from embedded functions.
That would allow far more, and more powerful, expressions to be built.
For example, =ContainsText() should be able, perhaps optionally, to return the text found - like =GetLabelledText() does now. The =ContainsText() function should be able to be embedded as Parameter 2 of =CombinesText() to create an output string based on the text returned.
Item Added
ID:2727
* Function references to be more flexible
- GladToBeGrey
- Famous
- Posts: 115
- Joined: 26 Oct 2004 09:16
- Family Historian: V7
- Location: Dorset, UK
- Jane
- Site Admin
- Posts: 8441
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Function references to be more flexible
Contains text currently returns a true/false. Would it not be better to have another function to return the text, but wouldn't that just return the data your searched for or are you looking to return the whole note or event or similar?
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
- GladToBeGrey
- Famous
- Posts: 115
- Joined: 26 Oct 2004 09:16
- Family Historian: V7
- Location: Dorset, UK
Function references to be more flexible
In that example I'd want the reference to the location of the text returned or null, say. That was but one example. Many other query languages I've worked with in the past are flexible enough to do this. Another way would be to have a wider range of 'primitive' functions that could be combined/embedded. A bit more like VBA, say.