Skip to content

Commit

Permalink
Add documentation for to_var function #282
Browse files Browse the repository at this point in the history
TobiasNx committed Oct 14, 2024
1 parent cee638a commit 8ad9cde
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -267,6 +267,23 @@ put_vars(

[Java Code](https://github.com/search?type=code&q=repo:metafacture/metafacture-fix+path:FixMethod.java+"+put_vars+{")

##### `to_var`

Defines a single global variable that can be referenced with `$[<variableName>]` and assinges the value of the `<sourceField>`.

```perl
to_var("<sourceField>", "<variableValue>")
```

Options:

- `"default"`: provide default value if source field does not exist.


[Example in Playground](https://metafacture.org/playground/?example=to_var)

[Java Code](https://github.com/search?type=code&q=repo:metafacture/metafacture-fix+path:FixMethod.java+"+to_var+{")

#### Record-level functions

##### `add_field`

0 comments on commit 8ad9cde

Please sign in to comment.