Service - FormObjectCreate Config: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
(Created page with "= Overview = Manages configuration for one form used to create a new object = Repository = https://bitbucket.org/izara-core-shared/izara-core-shared-formobjectcreate-config = DynamoDB tables = == FormObjectCreateConfigMain == <syntaxhighlight lang="JavaScript"> { formObjectCreateConfigId: "xx", // {random uuid} formObjectCreateConfig: "xx", // json encoded object of configuration formObjectCreateConfigName: "yy", // user specified name of the config userId: "xx...")
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 6: Line 6:


https://bitbucket.org/izara-core-shared/izara-core-shared-formobjectcreate-config
https://bitbucket.org/izara-core-shared/izara-core-shared-formobjectcreate-config
= ObjectSchema =
== formObjectCreateConfig ==
<syntaxhighlight lang="JavaScript">
[
  {
    objectType: "formObjectCreateConfig",
    storageResources: {
      "dynamodb": {
        storageType: "dynamoDB",
        tableName: "FormObjectCreateConfigMain"
      }
    },
    fieldNames: {
      formObjectCreateConfigId: {
        type: "string",
        randomOnCreate: true,
        requiredOnCreate: false,
        optionalOnCreate: false,
        canUpdate: false,
        storageResourceTags: ['dynamodb'],
      },
      formObjectCreateConfig: {
        type: "object",
        randomOnCreate: false,
        requiredOnCreate: true,
        optionalOnCreate: false,
        canUpdate: false,
        storageResourceTags: ['dynamodb'],
      },
      formObjectCreateConfigName: {
        type: "string",
        randomOnCreate: false,
        requiredOnCreate: true,
        optionalOnCreate: false,
        canUpdate: true,
        storageResourceTags: ['dynamodb'],
      },
      userId: { // before put check with base-user-id or targetId
        type: "string",
        randomOnCreate: false,
        requiredOnCreate: true,
        optionalOnCreate: false,
        canUpdate: false,
        storageResourceTags: ['dynamodb'],
      },
    },
    identifiers: [
      {
        type: "partitionKey",
        fieldName:"formObjectCreateConfigId"
      },
    ],
  },
]
</syntaxhighlight>


= DynamoDB tables =
= DynamoDB tables =
Line 63: Line 122:
formElementType: "data{same tableConfig}",
formElementType: "data{same tableConfig}",
fieldName: "fieldName_1",
fieldName: "fieldName_1",
displayOnly: true|false,
},
},
// want to add way to also create or link to other objects according to relationshipTypes
// want to add way to also create or link to other objects according to relationshipTypes

Latest revision as of 02:24, 17 July 2025

Overview

Manages configuration for one form used to create a new object

Repository

https://bitbucket.org/izara-core-shared/izara-core-shared-formobjectcreate-config

ObjectSchema

formObjectCreateConfig

[
  {
    objectType: "formObjectCreateConfig",
    storageResources: {
      "dynamodb": {
        storageType: "dynamoDB",
        tableName: "FormObjectCreateConfigMain"
      }
    },
    fieldNames: {
      formObjectCreateConfigId: {
        type: "string",
        randomOnCreate: true,
        requiredOnCreate: false,
        optionalOnCreate: false,
        canUpdate: false,
        storageResourceTags: ['dynamodb'],
      },
      formObjectCreateConfig: {
        type: "object", 
        randomOnCreate: false,
        requiredOnCreate: true,
        optionalOnCreate: false,
        canUpdate: false,
        storageResourceTags: ['dynamodb'],
      },
      formObjectCreateConfigName: {
        type: "string",
        randomOnCreate: false,
        requiredOnCreate: true,
        optionalOnCreate: false,
        canUpdate: true,
        storageResourceTags: ['dynamodb'],
      },
      userId: { // before put check with base-user-id or targetId
        type: "string",
        randomOnCreate: false,
        requiredOnCreate: true,
        optionalOnCreate: false,
        canUpdate: false,
        storageResourceTags: ['dynamodb'],
      },
    },
    identifiers: [
      {
        type: "partitionKey",
        fieldName:"formObjectCreateConfigId"
      },
    ],
  },
]

DynamoDB tables

FormObjectCreateConfigMain

{
	formObjectCreateConfigId: "xx", // {random uuid}
	formObjectCreateConfig: "xx", // json encoded object of configuration
	formObjectCreateConfigName: "yy", // user specified name of the config
	userId: "xx"
}
  • partition key: formObjectCreateConfigId
  • sort key: {none}

UsersFormObjectCreateConfigs

{
	userId: "xx" // user who owns the config
	formObjectCreateConfigId: "xx",
}
  • partition key: userId
  • sort key: formObjectCreateConfigId

formObjectCreateConfig Object

{
	formName: "xx", // set by the creator of the form, displayed in setup pages
	
	// grouping/row/cell/elements structure same tableConfig
	// add css theme and overwrite settings
	// standardize property names to match tableConfig structure (eg elementTypes)
	rows: {
		rowName: "xx",
		groupings: [
			{
				groupingName: "xx",
				rows: [
					{
						rowName: "xx",
						cells: [
							{
								cellName: "xx",
								elements: [
									{
										formElementType: "freeText", // freeText|data{same tableConfig}
										text: "xxx",
									},
									{
										formElementType: "data{same tableConfig}",
										fieldName: "fieldName_1",
									},
									// want to add way to also create or link to other objects according to relationshipTypes
								]
							},
							// ..
						]
					},
					//...
				],
			},
			//...
		],
	},
	//...
}

Working documents

FormObjectCreate Config