Fieldcode Manual

Tip: You can use filters for better results

Writing mappings with Python

Fieldcode provides an embedded Python language to write Incoming and Outgoing Mappings more efficiently.
To change an existing Incoming Mapping to Python language, one should click on the Switch to Expert Mode button on the Edit Incoming Mapping form.
For Outgoing Mappings Python is the default and only supported mapping method.

Using the Python editor

The Python editor is an integrated text editor with general syntax highlighting and autocomplete features. It allows the user to edit the mapping code in a simple, clean environment.

Editor Shortcuts:

  • Ctrl + Space: show autocomplete suggestions on caret
  • Ctrl + D: select word on caret
  • Alt + Up/Down: move the line of the caret, or the selected text, up/down by a line
  • Ctrl + F or Ctrl + G: open search and replace

Other common shortcuts like cut/copy/paste, undo/redo also work.

Using the embedded Python language

On the interface you can use our embedded Python language according to the reference. The fcinterface module is also available to be imported in both Incoming and Outgoing Mapping scripts.

During mapping the following variables are also available globally:

  • data: this global variable represents the input of the mapping. For Incoming Mapping this translates to the payload of the request, and for Outgoing Mapping it is the selected Object.
  • props: this global variable allows access to all Properties of the selected System.
Was this topic helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we further improve this topic?
Please provide the reason for your vote. This will help us improve this topic.
Navigation