Actions
go-to
6min
this action redirects you to another {{jig}} the go to action can be used with elements like swipeable and rightelement or combined with another action when paired with another action, it is triggered after the main action to navigate to a specified screen, for example, saving a date in a form and then opening a list of customers go to helps configure navigation, ensuring a seamless app flow see navigation docid 38deazgfeqbltqr2z ugw for more information configuration option configuration option a go to go to action can be set up in various ways as a separate action or in the action list as an associated action in the action list as a swipeable action in the left or right direction as rightelement in the list use the go to to open a {{jig}} as a modal using the ismodal property set to true set to false opens navigates to the specified {{jig}} use the behaviour property to determine if you want to push the {{jig}} into the history of navigation, by using the new value, or reuse the one you already have in history by using the existing value considerations current known limitations when using the ismodal property include unable to send a value from the {{jig}} modal to the parent {{jig}} depending on the device used different behavior can be expected, such as the {{jig}} will slide from the bottom to top, but the entire screen will be covered this applies to on any android device (phones and tablets) on an ipad in landscape mode when the drawer is open, it will only open in the {{jig}} panel when the drawer is closed, it will cover the entire screen, but it will not display as a modal examples and code snippets examples and code snippets go to as an action the simplest example of using a go to action is to use it as a separate action when configured, a button will appear at the bottom, redirecting us to the details page when pressed examples see the full example using static data in github see the full example using dynamic data in github go to actions \ children \ type action go to options title go to linkto default employee detail go to swipeable left/right go to with swipeable this example uses the go to action as a swipeable property we can choose the swipe direction left or right after pressing the button, it will redirect to the details of the person examples left see the full example using static data in github see the full example using dynamic data in github examples right see the full example using static data in github see the full example using dynamic data in github left item type component list item options title =@ctx current item lastname subtitle =@ctx current item firstname leftelement element avatar text " " uri =@ctx current item img rightelement element button title go to onpress type action go to options linkto default employee detail right item type component list item options title =@ctx current item lastname subtitle =@ctx current item firstname leftelement element avatar text " " uri =@ctx current item img swipeable right \ label go to color primary onpress type action go to options linkto default employee detail go to right button element in this example, we use the go to action as the rightelement in the list item component there is a button for each item examples see the full example using static data in github see the full example using dynamic data in github go to rightelement jigx item type component list item options title =@ctx current item lastname subtitle =@ctx current item firstname leftelement element avatar text " " uri =@ctx current item img rightelement element button title go to onpress type action go to options linkto default employee detail go to onsuccess in this example, the go back action is associated with the submit form action after we enter the signature and press the "sign" button, the submit form action is performed and then the go to action redirects us to the next page examples see the full example using dynamic data in github go to onsuccess jigx actions \ children \ type action action list options title sign and go to detail issequential true actions \ type action execute entity options provider data provider dynamic entity default/form method create data signature =@ctx components signature state value onsuccess title succesfully signed actions \ type action go to options title go to employee detail linkto default employee detail \ type action go back go to open a jig as a modal in this example, we use the go to action as the rightelement in the list item component there is a button for each item when tapped the go to will open the {{jig}} as a modal when the ismodal property is set to true examples see the full example using dynamic data in github open jig in a modal go to ismodal jigx title go to action type jig list data =@ctx datasources employees dynamic item type component list item options title =@ctx current item lastname subtitle =@ctx current item firstname leftelement element avatar text " " uri =@ctx current item photo rightelement element button title go to onpress type action go to options \# when navigating to the jig, the jig opens as a modal, \# specifying false will open as a normal jig ismodal true linkto default employee detail default employee detail jigx title employee detail type jig default children \ type component avatar options title '' uri https //images unsplash com/photo 1591084728795 1149f32d9866?ixlib=rb 1 2 1\&ixid=mnwxmja3fdb8mhxwag90by1wywdlfhx8fgvufdb8fhx8\&auto=format\&fit=crop\&w=928\&q=80 size large align center \ type component entity options children \ type component section options title personal information children \ type component field row options children \ type component entity field options label birth date value '12 02 1993' \ type component entity field options label gender value male \ type component field row options children \ type component entity field options label email value fisher\@first com contenttype email \ type component entity field options label phone value '+61 392 482 323' contenttype phone \ type component section options title address children \ type component field row options children \ type component entity field options label street value 14 argyle street \ type component entity field options label city value titaatee creek \ type component field row options children \ type component entity field options label state value new south wales \ type component entity field options label country value australia \ type component list options data =@ctx datasources quartal ishorizontal true item type component pie chart options chart title text =@ctx current item title verticalalign center subtitle text =@ctx current item subtitle verticalalign center width 140 height 140 isanimated true legend ishidden true series \ data =@ctx current item data employees dynamic jigx type datasource sqlite options provider data provider dynamic entities \ entity default/employees query | select id, '$ firstname', '$ lastname', '$ picture', '$ modify', '$ date from', '$ date to', '$ email', '$ phone', '$ percentage', '$ category', '$ photo', '$ time' from \[default/employees] where '$ category' = "employees" order by '$ firstname' asc quartal jigx type datasource static options data \ title 91% subtitle q1/2022 data \ y 91 color positive \ y 9 color transparent \ title 99% subtitle q2/2022 data \ y 99 color positive \ y 1 color transparent \ title 10% subtitle q3/2022 data \ y 10 color positive \ y 90 color transparent \ title 0% subtitle q4/2022 data \ y 0 color positive \ y 100 color transparent go to using new & existing behaviour in this example, three {{jig}} s are configured to create a stack of data for each guest, including their name, age, and address each {{jig}} 's go to action is set with the behaviour property as new , enabling new guest details to be pushed into the app history in the final {{jig}} , a secondary go to action is added this action introduces a button to review each guest's data by setting the behaviour property to existing and linking to the first {{jig}} in the stack via the linkto property the review process will cycle through each guest's details in the stack before completing jig a jigx title name type jig default onfocus type action reset state options state =@ctx solution state header type component jig header options height medium children type component image options source uri https //images unsplash com/photo 1521336575822 6da63fb45455?w=800\&auto=format\&fit=crop\&q=60\&ixlib=rb 4 0 3\&ixid=m3wxmja3fdb8mhxzzwfyy2h8mtb8fgfkdmvudhvyzxxlbnwwfhwwfhx8ma%3d%3d children \ type component form instanceid form a options isdiscardchangesalertenabled false children \ type component text field instanceid fullname options label name actions \ children \ type action action list options title next issequential true actions \ type action execute entity options provider data provider local entity guests method save data fullname =@ctx components fullname state value \# the go to action is configured to open the next jig in the stack \ type action go to options \# set the parameters to use the value held in the state, \# this will be used as an input throughout the stack inputs fullname =@ctx components fullname state value \# select new to push the jig into the app history, \# this allows you to capture the next jig's data in the stack behaviour new \# configure which jig must open next linkto jig b jig b jigx title age type jig default \# use inputs from the first jig in the stack inputs fullname type string required true header type component jig header options height medium children type component image options source uri https //images unsplash com/photo 1471400974796 1c823d00a96f?w=800\&auto=format\&fit=crop\&q=60\&ixlib=rb 4 0 3\&ixid=m3wxmja3fdb8mhxzzwfyy2h8m3x8ywr2zw50dxjlfgvufdb8fdb8fhww children \ type component form instanceid form a options isdiscardchangesalertenabled false children \ type component number field instanceid age options label age actions \ children \ type action action list options title next issequential true actions \ type action execute entity options provider data provider local entity guests method save data age =@ctx components age state value \# select new to push the jig into the app history, \# this allows you to capture the next jig's data in the stack \ type action go to options \# set the parameters to use the input value passed from the first jig in the stack inputs fullname =@ctx jig inputs fullname \# select new to push the jig into the app history, \# this allows you to capture the next jig's data in the stack behaviour new \# configure which jig must open next in the stack linkto jig c jig c jigx title address type jig default \# use inputs from the first jig in the stack inputs fullname type string required true header type component jig header options height medium children type component image options source uri https //images unsplash com/photo 1563013544 824ae1b704d3?w=800\&auto=format\&fit=crop\&q=60\&ixlib=rb 4 0 3\&ixid=m3wxmja3fdb8mhxzzwfyy2h8mtb8fg9ubgluzsuymgnhcnr8zw58mhx8mhx8fda%3d children \ type component form instanceid form a options isdiscardchangesalertenabled false children \ type component text field instanceid address options ismultiline true label address actions \ children \ type action go to options inputs fullname =@ctx jig inputs fullname \# in this go to action we go back to start capturing the next stack \# in the data set title add another guest \# select new to push the jig into the app history, \# this allows you to capture the next set of data for a new stack behaviour new \# open the first jig in the stack to start capturing the new stack of data linkto jig a \# add a second go to action that will create a secondary button, \# allowing you to review the existing data set in the stack \# add existing to behaviour which will cycle through all the jigs in the history, \# showing the jig with the data for each jig \# note the jigs will cycle through the screens for each capture, \# meaning if you captured 3 sets in the stack, all 3 stacks are shown \ type action go to options title review details \# select existing to return and display the jig data \# that is held in the app history behaviour existing \# open the first jig in the stack to start cycling through the data \# for each stack captured linkto jig a