Create Programmatic Notebook Forms
Graph Studio allows you to programmatically create notebook forms using the Java (PGX) and Python (PGX) interpreters.
The prerequiste step (to import the context) and the methods to generate
these forms are similar to the methods described for Create Programmatic Dynamic Forms. However, the methods take an optional argument
(true
) to indicate that the form should be a notebook form as shown.
This optional argument is false
by default.
ds.textbox("<name>", "<default_value>", "<label>", true)
In the preceding code:
name
: The name of the notebook form. It is displayed on top of the notebook form if no label is set. If you want to reference a notebook form multiple times in a paragraph, you can assign the samename
to do so and it will only be displayed once.label
(optional): The label that is displayed on top of the notebook form.default_value
(optional): The default value that is given to the notebook form when it is first created.
For example:
ds.textbox(name='<name>', default_value='<default_value>', label='<label>', is_notebook=True)
In the preceding code:
name
: The name of the notebook form. It is displayed on top of the notebook form if no label is set. If you want to reference a notebook form multiple times in a paragraph, you can assign the samename
to do so and it will only be displayed once.label
(optional): The label that is displayed on top of the notebook form.default_value
(optional): The default value that is given to the notebook form when it is first created.
For example: