dynamic_command Fields Code Completion
Introduction
On this page, we will cover the following:
- Showing the dynamic command specific fields.
- Adding a new SAP Connection field and showing the update code completion menu.
1 - Showing the dynamic command specific fields
The GIF above shows the code completion menu when using the dynamic_command
decorator. Notice that relevant information such as Supported Statuses, Timeout, Execution Option, and Asynchronous
is also shown.
The sample_outprc_dynamic_cmd
does not depend on any fields, which is why typing fields[
results in zero suggestions.
2 - Adding a new SAP Connection field and showing the update code completion menu.
Let's add a new SAP Connection field and add it as a dependent field of sample_outprc_dynamic_cmd
to demonstrate:
- The code completion is responsive to changes in
template.json.
- The code completion menu specific to a SAP Connection type field.
Go ahead and add a new SAP connection field as shown below:
Add the new field as a dependency of sample_outprc_dynamic_cmd:
Execute UIP: Pull
to update the local template.json
.
Assuming the local template has been updated, typing fields[
will now show the new sample_sap_connection
field:
Additionally, as shown above, the specific component parts (e.g. sap_ashost, sap_client, sap_connection_type etc.
) of a SAP Connection field can be accessed by typing a second [
following fields["sample_sap_connection"]