Actions
action-list
3min
this action allows for multiple actions to be run while only requiring the user to press a single button the actions can be set to run sequentially or executed as a bulk functionality configuration options configuration options an action list can be set up in various ways as a primary action button in onpress/onchange events usually triggered by list docid 9auyvjm1lnc6h0zp1ujca or jig list docid 5uifnxycbeewhizctnjqm related items in onrefresh/onfocus events on any type of {{jig}} examples and code snippets examples and code snippets action list as a primary action button this example shows an action list with two actions the first action is submit form , which will save the entered data, and the second action, go back , will redirect us back to the previous page example see the full example of action list in github action list title action list example type jig default description the first action will submit the form and the second action will redirect us back to the previous page actions \ children \ type action execute entity options title create record provider data provider dynamic entity default/employees method save data firstname =@ctx components firstname state value lastname =@ctx components lastname state value phone =@ctx components phone state value onsuccess type action go back children \ type component form instanceid simple form options isdiscardchangesalertenabled false children \ type component text field instanceid firstname options label first name \ type component text field instanceid lastname options label last name \ type component text field instanceid phone options label phone number keyboardtype decimal pad action list as onpress/onchange in this example, we have an action list with the onpress function in the list item the first action will color the last chosen item and the second action will sync our entity with the database and we can use them for further actions example see the full example of action list in onpress in github see the full example of action list in onchange in github action list onpress item type component list item options title =@ctx current item firstname subtitle =@ctx current item email progress =@ctx current item id = @ctx solution state activeitemid ? 1 0 color \ when =@ctx current item id = @ctx solution state activeitemid ? true \ false color color2 onpress type action action list options actions \ type action set state options state =@ctx solution state activeitemid value =@ctx current item id \ type action sync entities options provider data provider dynamic entities \ default/employees action list onchange item type component list item options title =@ctx current item firstname subtitle =@ctx current item email progress =@ctx current item id = @ctx solution state activeitemid ? 1 0 color \ when =@ctx current item id = @ctx solution state activeitemid ? true \ false color color2 rightelement element switch onchange type action action list options actions \ type action set state options state =@ctx solution state activeitemid value =@ctx current item id \ type action sync entities options provider data provider dynamic entities \ default/employees action list as onrefresh/onfocus in this example when we refresh the jig/jig is focused, we call set state and sync entities actions example see the full example of the action list onrefresh in github see the full example of the action list onfocus in github action list onrefresh onrefresh type action action list options issequential true actions \ type action set state options state =@ctx solution state refresh key value refreshed \ type action sync entities options provider data provider dynamic entities \ default/employees action list onfocus onfocus type action action list options issequential true actions \ type action set state options state =@ctx solution state focus key value focused \ type action sync entities options provider data provider dynamic entities \ default/employees