MMpy.FormSet.save
Syntax
formset.save(form_set_name='', set_id=-1, storage_type=MMpy.StorageType.project)
Description
Saves the form set to the database.
Parameters
Name |
Type |
Description |
---|---|---|
form_set_name |
str (optional) | Optional name given to the saved form set. |
set_id | int (optional) | Forces the form set to be stored with a specific form ID. -1 is treated as not specified. |
storage_type | MMpy.StorageType (optional) | The storage type to save the form set to. |
Returns
Type |
Description |
---|---|
int | The ID of the saved set. |
Notes
If form_set_name is given without specifying set_id, then the application will overwrite the existing form set if it exists, otherwise creating a new one with an auto-generated set ID.
If form_set_name is given with set_id specified, then the application will overwrite the existing form set for set_id if it exists, with the specified name. If it does not exist, it will create a new form set with the specified name and set ID.
By default the project storage type is used if no parameter is supplied.
If a pipe ('|') character is used in the form set name, this denotes a folder hierarchy.
Valid choices for storage_type are:
- MMpy.StorageType.default
- MMpy.StorageType.project
- MMpy.StorageType.global_ (global is a reserved Python keyword)
- MMpy.StorageType.user
Examples
formset = MMpy.FormSet('WS_LOAD_GRIDFILE', '15.0.0.0') ... formset.set_field('FILE', 'WOLF_TND.GRD') ... formset.save('Gridding')
Resource ID
IDPH_FORMSET_SAVE