You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/fix/Fix-functions.md
+73-28Lines changed: 73 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,6 @@ nav_order: 2
8
8
This page is a replication of the passage [Functions](https://github.com/metafacture/metafacture-fix?tab=readme-ov-file#functions) of the Fix Readme.md. Status: [Fix Release 1.1.2](https://github.com/metafacture/metafacture-fix/releases/tag/1.1.2)
Defines a single global variable that can be referenced with `$[<variableName>]` and assigns the value of the `<sourceField>`.
151
+
152
+
```perl
153
+
to_var("<sourceField>", "<variableName>")
154
+
```
155
+
156
+
Options:
157
+
158
+
-`default`: Default value if source field does not exist. The option needs to be written in quotation marks because it is a reserved word in Java. (Default: Empty string)
159
+
160
+
[Example in Playground](https://metafacture.org/playground/?example=to_var)
We advise you to use [`add_array`](#add_array) instead of `set_array` due to changing behaviour in an upcoming release. For more information see: [#309](https://github.com/metafacture/metafacture-fix/issues/309)
375
427
376
428
##### `set_field`
377
429
378
-
Creates (or replaces) a field with a defined value.
We advise you to use [`add_field`](#add_field) instead of `set_field` due to changing behaviour in an upcoming release. For more information see: [#309](https://github.com/metafacture/metafacture-fix/issues/309)
We advise you to use [`add_hash`](#add_hash) instead of `set_hash` due to changing behaviour in an upcoming release. For more information see: [#309](https://github.com/metafacture/metafacture-fix/issues/309)
398
439
399
440
##### `timestamp`
400
441
@@ -567,7 +608,7 @@ Parameters:
567
608
568
609
Options:
569
610
570
-
-`__default`: Default value to use for unknown values. (Default: Old value)
611
+
-`default`: Default value to use for unknown values. The option needs to be written in quotation marks because it is a reserved word in Java. (Default: Old value)
571
612
-`delete`: Whether to delete unknown values. (Default: `false`)
572
613
-`print_unknown`: Whether to print unknown values. (Default: `false`)
0 commit comments