Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.

Commit 8ad9cde

Browse files
committed
Add documentation for to_var function #282
1 parent cee638a commit 8ad9cde

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,23 @@ put_vars(
267267

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

270+
##### `to_var`
271+
272+
Defines a single global variable that can be referenced with `$[<variableName>]` and assinges the value of the `<sourceField>`.
273+
274+
```perl
275+
to_var("<sourceField>", "<variableValue>")
276+
```
277+
278+
Options:
279+
280+
- `"default"`: provide default value if source field does not exist.
281+
282+
283+
[Example in Playground](https://metafacture.org/playground/?example=to_var)
284+
285+
[Java Code](https://github.com/search?type=code&q=repo:metafacture/metafacture-fix+path:FixMethod.java+"+to_var+{")
286+
270287
#### Record-level functions
271288

272289
##### `add_field`

0 commit comments

Comments
 (0)