Building Apps with Jigx
...
Data Providers
Dynamic Data
Creating columns & data records
11min
there are three methods to create columns in {{dynamicdata}} tables, and it all depends on where your data comes from if it is pre existing or new data to be added while the app is in use create a {{jig}} in {{jigxbuilder}} with the columns and save data to your table create your columns and data manually in {{jigxmanagement}} import your data from a csv or json file using the jigx management {{jigx}} does not recommend storing images in {{dynamicdata}} (via any conversion), as the max file size per record is 350k creating columns and records via jigx builder you can create columns in the table by creating a {{jig}} , then define the columns you require in the table by using the {{dynamicdata}} provider's create or save method here are scenarios commonly used to create columns and data from a {{jig}} create a https //docs jigx com/examples/form and use the https //docs jigx com/examples/submit form action in this scenario the formid in the component form is used in the submit form action to get context to the property instanceid each value used in the instanceid becomes the column's name in the table the entity property specifies the table to add the columns and data to the columns and data records are created when the form is completed and submitted on the mobile device and not at the time of publishing the solution in {{jigxbuilder}} form creates column and data record add a component form to a {{jig}} and give it a formid add any of the available form properties, such as text field docid\ h rhabpb9srsfz xcdq8d , date picker docid 8zlbrylxfefdxjbzjajv , number field docid\ n6vogtgmi33tkm8ytke r give each form property an instanceid add the submit form action specify the same formid used in the component form use the data provider dynamic with the create or save method in the entity property, specify the table where the columns and data must be added publish the solution open the solution in {{jigxapp}} and complete the form, click the submit button browse to {{jigxmanagement}} > solution >data> table to see the new record and columns employee form jigx title new employee form description capture the new employee details type jig default header type component jig header options height medium children type component image options source uri https //unsplash com/photos/black smartphone lnlzd y7orw children \ type component form instanceid form employee # used in the submit form action to get context to the property instanceid options children \ type component text field instanceid first name # becomes the name of the column in table options label first name \ type component text field instanceid last name # becomes the name of the column in table options label last name \ type component number field instanceid contact number # becomes the name of the column in table options label mobile number \ type component date picker instanceid date of birth # becomes the name of the column in table options label date of birth \ type component avatar field instanceid photo # becomes the name of the column in table options label my profile \ type component signature field instanceid signature # becomes the name of the column in table options label sign \ type component email field instanceid email # becomes the name of the column in table options label email address actions \ children \ type action submit form options formid form employee #used to get context to the property instanceids provider data provider dynamic # dynamic data provider title create record # creates data and the columns if they do not already exist entity default/employee # specify the table to create the data and columns in method create # use create or save onsuccess type action go back use execute entity docid\ jgwlsfzaop6u6mph6u5to or execute entities docid 04w n xofaosgbbwmozha action to create columns and data records in this scenario you can use actions in a {{jig}} that interact with data to add columns and data records the columns and data are configured in the data property the action use the following actions with the {{dynamicdata}} provider's create and save methods action execute entity used to add a single data record action execute entities used to add multiple data records execute entity action type action execute entity options provider data provider dynamic entity default/department method create data department name =@ctx current item department manager name =@ctx current item manager email =@ctx datasources company contacts email execute entities action type action execute entities options provider data provider dynamic entity default/department method create data department name =@ctx current item department manager name =@ctx current item manager email =@ctx datasources company contacts email creating columns in jigx management manually create columns and data records creating columns open management overview docid 9fi8lwqnp477my3tpa56m , navigate to your solution and select the data option click on the table you want to add a record to in the right hand tables pane click on the blue new record button if you already have records in the table, you will see all existing columns of all records in the new record pane add the data values for each column add new columns to your record by defining a column name and clicking on the + button next to the new column name as you add data in the column the field displays the type under the entry, such as number, string or boolean enter data values in the column fields and click save you do not need to specify an rid column dynamic data will create a guid based id column for you automatically you can optionally view the rid column by selecting the settings button and checking the id column as a visible column importing data using a json or csv file if you have pre existing data or a large data set with multiple records to add to a table you can import the data by uploading a csv or json file that will create the columns and populate the data records add data with json file open management overview docid 9fi8lwqnp477my3tpa56m , navigate to your solution and select the data option click on the table you want to add a record to in the right hand tables pane click on the upload button at the top of the screen by default the json upload window is shown you can toggle to upload csv using the switch to csv button in the top right provide the property name for the unique identifier, otherwise by default the rid (guid based id) property will automatically be created for you drag and drop the file in the designated area click save for csv uploads select the type of comma delimited used in the csv file drag and drop the file in the designated area click add click save examples and code snippets the following examples with code snippets are provided creating dynamic data docid 4lpsgop2jycafczuzrd reading dynamic data docid\ knt f0af7 2egp xlmwox updating dynamic data docid\ p4l1hgfcfgngh7uyulthv deleting dynamic data docid\ npafzfmates6okxtiwzut see also using dynamic data docid\ cstyvlipnvmqdx4oc311t