Save Entity Value

Save Entity Value

Kuika's Save Entity Value action is used to create or update the attribute value of an entity using a dynamic model. In this action, all necessary information is collected in a single model structure, and the system performs the operation through this model.

This action is currently available in beta version and is still under development. It is recommended to test it carefully before using it in a production environment.

The model parameter is a comprehensive data structure containing entity information related to the attribute value, attribute ID, value, and other optional fields.

Technical Specifications

  • Model (Object - Required):The object containing all information related to the attribute value. It usually contains the following fields:
    • EntityId (Guid)
    • AttributeId (Guid)
    • Value (Any)
    • EntityValueId (Guid) — if available, update; otherwise, create a new record
    • Other optional metadata fields
  • Data Source Compatibility: The model parameter can be selected from the following sources via the Symbol Picker:
    • Form Component (e.g., dynamic form model object)
    • Action Result (previous action result)
    • Fixed (fixed JSON object)
    • Current
  • Web & Mobile Support: The Save Entity Value action works in both web and mobile applications.
Save Entity Value Action Application Steps

1. Preparing the Model Object

  • All attribute information and values from a dynamic form or other source are collected as a model object.

2. Adding an Action

  • For example, to the ‘Save’ button:
    • + ADD ACTION > OnClick > EAV > Entity Value > Save Entity Value
  • Parameters:
  • Model: Symbol Picker > Form Component or Action Result

3. Result

  • The system creates a new entity value with the information in the model or updates the existing record.
  • The user can be notified in case of success.
  • An error message can be displayed in case of failure.
Usage Scenario: Saving Data from a Dynamic Form

In an application, users need to fill out a dynamic form consisting of different attributes and save this information in the system. These form fields are not predefined fixed fields, but are determined dynamically by the user or the system.

Scenario Steps:

  1. Creating a Dynamic Form:
    • The application retrieves the attribute structure of the entity associated with the Get Entity Attributes action.
    • Dynamic form components (input, dropdown, checkbox, date picker, etc.) are created based on this attribute information.
    • The form contains the appropriate components for each attribute and is displayed to the user.
  2. User Data Entry:
    • The user fills out the form. For example:
      • Name (String)
      • Date of Birth (Date)
      • Subscription Status (Boolean)
      • Number of References (Integer)
    • Each value entered is stored in the form components.
  3. Creating the Model Object:
    • All values in the form are collected in the system as a single model (JSON object).
    • The model contains the following information for each attribute:
      • EntityId: The ID of the related entity (e.g., customer ID)
      • AttributeId: The ID of the attribute corresponding to each form field
      • Value: The value entered by the user
      • (If available) EntityValueId: The ID of the previously saved value (for updating)
  4. Triggering the Save Entity Value Action:
    • After the user completes the form, they click the ‘Save’ button.
    • The Save Entity Value action, which takes the form model as a parameter, is added to the OnClick event of the button.
    • This action creates or updates all attribute values in the model in the system.
  5. Post-Process Feedback:
    • If the record is successful, the message ‘Information saved successfully’ is displayed to the user.
    • The form can be reset or the user can be redirected to other operations.
    • If there is an error, an appropriate error message is displayed.
Save Entity Value Action Advanced Customisations
  • Bulk Record: Multiple attribute values can be transferred at the same time within the model.
  • Version Control: A version number or date information can be added during the update.
  • Conditional Registration: Registration can be made or cancelled if certain conditions are met.
  • Feedback: Form clearing, page refresh or message display can be performed after registration.

Technical Risks

  • Model Structure Incompatibility: Field names and data types in the model must be fully compatible with the system.
  • Missing Fields: EntityId, AttributeId, and Value fields are mandatory.
  • Data Integrity: Sent values must be compatible with the DataType of the attributes.

The Save Entity Value action is a powerful method that facilitates dynamic and comprehensive data recording/updating processes on the Kuika platform. Its model-based structure enables effective management of multiple data fields.

Other Related Content

No items found.

Glossary

No items found.

Alt Başlıklar