Page 1 of 1

Wildcards in expressions in custom Tabs

Posted: 08 Jan 2022 07:56
by emkay
I am creating a custom individual property box tab to display Electoral Roll year and the Electoral Division & Sub-Division for our electoral rolls here in Aus.

I created a custom attribute where the attribute value is set to the Division & Sub-Division & the attribute Date is the Roll compilation date year. The roll updates occur periodically with no set frequency. And this is my problem.

I have created a custom tab, to display the custom attribute, and am creating items for the tab, wishing to display on a decade basis, if there were any electoral roll entries for an individual. (see attached pic) If I have the exact year in the expression "[year=1973]" it works fine. Is it possible to have a wildcard in the year, eg "[year=197*]" so that any entry for the 1970's will be displayed? Initially, just the first entry for the 70's will do but it would be nice to see them all, but this is a secondary wish list.

Cheers .................
Screenshot 2022-01-08 185050.jpg
Screenshot 2022-01-08 185050.jpg (79.15 KiB) Viewed 882 times

Re: Wildcards in expressions in custom Tabs

Posted: 08 Jan 2022 11:29
by tatewise
Sorry, but I don't think there is any way to achieve your objectives in this case.

Certainly, wildcards are not allowed in the [year=...] index.

You cannot use an Expression to test the fact Date because Expressions are not allowed in custom tab Data References.
Even with an Expression, it would get quite complex to just select facts in a particular Date range.

Re: Wildcards in expressions in custom Tabs

Posted: 09 Jan 2022 07:16
by emkay
Thanks Mike.

But wrong answer (or not the answer I was after), go to the bottom of the class! :D :D

I have attacked it from a different angle by fact number, [1],[2],[3] etc. Not as elegant looking and doesn't obviously highlight the gaps in my research, but still fit for purpose.

On a similar vain - is it possible to make a complete tab "read only"? I have the custom tab with each roll displayed but would like to force myself to enter facts only on the "Facts" tab.

Thanks again for your swift response.

Cheers ......
Malcolm

Re: Wildcards in expressions in custom Tabs

Posted: 09 Jan 2022 11:37
by tatewise
No, it is not possible to make a custom tab read-only, except as explained below.

If you use the standard fact instance numerical index format such as [1], [2], [3], et seq, then they are writable.
If you use some of the other index formats such as [year=yyyy] or [last] or [last-2] then they are read-only.
So perhaps using [last-3], [last-2], [last-1], [last] will give you what you want.
The only snag is the custom tab will get populated from the bottom up instead of the top town.

Re: Wildcards in expressions in custom Tabs

Posted: 12 Jan 2022 06:19
by emkay
Thanks Mike.

Your suggestion worked a treat.

Cheers .............