/
Actions

Actions

Actions are embedded hyperlinks to either external resources or Forms

Screenshot 2024-08-26 at 11.08.16.png
The Link is only displayed for Inventory that is in stock.

Example:

- name: vacations group: Demo caption: Vacations type: list description: | Übersicht der Urlaube formId: create_vacation icon: 'edit' actions: - label: 'Edit vacation' # Handlebar key: 'edit_vacation' type: 'FORM' # [LINK, FORM ] condition: - expression: "{{eq VACATION_EMAIL PORTRAIT_USER_EMAIL}}" forwardFields: - key - VACATION_EMAIL - VACATION_DATE - VACATION_STATUS

So all Entries of src-inventory have the same configured actions available. However not all actions are displayed equally. For example inventory items that are not in stock (amount <= 0) the link is not displayed. In addition, the value of the link is also different for each inventory item

Actions for triggering Forms

Screenshot 2024-08-26 at 11.12.36.png

I am logged in as user linda.jackson and therfore are only allowed to open the edit vacation form assigned to this user.

Example

actions: - label: 'Edit vacation' # Handlebar key: 'action1' value: 'create_vacation' type: 'FORM' # [LINK, FORM ] condition: - expression: "{{eq VACATION_EMAIL PORTRAIT_USER_EMAIL}}" forwardFields: - key - VACATION_EMAIL - VACATION_DATE - VACATION_STATUS

Please also make sure to also apply the condition to the form itself for maximum security! see Post Processing (onSubmit) | Conditions

Properties

Attribute

Examples

Description

Default

Handlebar support

Attribute

Examples

Description

Default

Handlebar support

type

either 'LINK' or 'FORM'

type: 'LINK'

LINK creates an embedded hyperlink to a protocol of your choice (HTTP, mailto, …)

FORM is a reference to an existing Forms

LINK

key

key: 'CtaManufacturerInfo'

unique string value

unique action name for this section

required

label

label: 'Manufacturer Info {{Name}}'

label for the embedded link

required

value

value: 'https://www.google.com?q={{ModelCode}}'

value: 'createVacation'

Either the displayed value for in case of type: 'LINK'

or the id for the form you want to referece in case of type 'FORM'

''

(blank)

icon

icon: 'info'

displayed icon for the embedded link

info

condition

condition: - expression: "{{gt Amount 0}}" - expression: "{{eq VACATION_EMAIL PORTRAIT_USER_EMAIL}}"

Decides if the action is available for this entry.

Available Parameters see

Parameters

For more details see

https://portrait.atlassian.net/wiki/x/AYDHPg

(the errorMessage is only logged here and not passed to the user)

no condition

(so always true)

 

 

 

 

 

Related content

Column Types
Column Types
Read with this
Parameters
Parameters
More like this
ELO sources
ELO sources
Read with this
Entry
More like this
Settings
Read with this
Entry
More like this