Create Programmatic Dynamic Forms

Graph Studio allows you to programmatically create dynamic forms using the Java (PGX) and Python (PGX) interpreters.

You can pass dynamic values (such as variables, arrays, and so on) through Java or Python code to generate dynamic forms.

As a prerequisite step, you must first import the context that allows you to display the forms and define your own variable name and instantiate your context.

import oracle.datastudio.interpreter.common.context.JavaDataStudioContext
JavaDataStudioContext ds = interpreter.getJavaDataStudioContext()
from ds_interpreter_client.context.ds_context import PyDataStudioContext
ds = PyDataStudioContext()

The ds context allows you to display the forms and define your own variable name.

The following steps describe the programmatic creation of the Textbox, Select, Select Multiple, Slider, Checkbox, Date Picker, Time Picker, and DateTime Picker forms. It is important to note that only when you run the notebook paragraph with the dynamic form value (or the default value), then the values are persisted on page reload.

Customize Dynamic Form Layout

You can use the columnSpan and nextRow parameters to enhance data entry and readability in dynamic form layouts.

The layout of a dynamic form is based on a 12-column grid. By default, each form spans four columns, allowing up to three forms per row. When the total column width exceeds 12, forms automatically wrap to the next row. The layout is responsive:

As a prerequisite step, you must first import the context that allows you to display the forms and define your own variable name and instantiate your context.

import oracle.datastudio.interpreter.common.context.JavaDataStudioContext
JavaDataStudioContext ds = interpreter.getJavaDataStudioContext()
from ds_interpreter_client.context.ds_context import PyDataStudioContext
ds = PyDataStudioContext()