Predefine functions for a document

It would be very nice to be able to predefine your own functions to use in a document.

For example, I have created an HR/administrative document for our organization.
I then map all other (historical) data sources to this database.
For example, we have a database of users in one system (e.g. a website) whose names are spelled differently than in another system (an old Excel file), and differently than in our global HR system, etc.

What I am doing now is normalizing the names as follows:

UPPER($lastname) + ", " + $firstname.

sometimes I have to do even more, i.e. replace certain characters with others etc.

So it actually looks more like this:
UPPER($lastname).replace("foo", "baa").replace("baz", "barz") + ", " + $firstname

I copied this formula/function several times in a document. And when I improve the formulas, I have to
update all occurrences.

It would be very helpful if there was a document-wide custom function record where I could predefine certain things.

2 Likes

You can simulate it with a dedicated table, with only one row where each column is your helper function. For example:

image

image

4 Likes

This is a hacky one :slight_smile: but it works.
I’ve done it like this now:

image
image

I just wasted a good hour, because the function column was set to “Text”.

If others read this, make sure the functions column is set to “Any”

2 Likes