Update Attribute

Update Attribute

Kuika's Update Attribute action is used to update an attribute that has been previously created within the EAV (Entity-Attribute-Value) data model. With this action, users or administrators can change the attribute's name, data type, description, required status, or default value. It is a critical element for flexibility and sustainability in dynamic data structures.

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.

Technical Specifications

  • Attribute Update (EAV Panel): The Update Attribute action works with the following required and optional parameters.
    • Required Parameters:
      • Id (Guid): The unique ID of the attribute to be updated in the system.
      • Name (String): The new or updated name of the attribute.
      • DataType (String): The data type of the attribute. System-supported data types such as String, Integer, Decimal, Boolean, Date must be entered.
    • Optional Parameters:
      • Description (String): Descriptive information for the attribute.
      • CategoryId (Guid): The category ID to which the attribute belongs.
      • IsRequired (Boolean): Indicates whether the attribute is required.
      • DefaultValue (Any): The default value of the attribute.
  • Data Source Compatibility: All parameters can be defined dynamically or statically via the Symbol Picker in Kuika with the following sources:
    • Component (Text Input, Switch, etc.)
    • Fixed
    • Screen Input
    • Action Result
    • Current
  • Web & Mobile Support: The Update Attribute action can be used in both web and mobile scenarios.
Update Attribute Action Application Steps

1. Creating the Required Form in UI Design

  • A Dynamic Form screen is prepared to display and edit the attribute data to be updated.
  • Required elements:
    • Text Input → Name
    • Select Box → DataType
    • Text Input → Description (optional)
    • Switch / Checkbox → IsRequired
    • Text / Number Input → DefaultValue
    • SelectBox (or fixed) → CategoryId
    • Button → ‘Update’

2. Filling the Form with the Get Attribute Action

  • When the page loads or an attribute is selected, the Get Attribute action is executed.
  • The returned information is distributed to the Dynamic Form element (binding is performed).

3. Adding the Update Attribute Action

  • When the ‘Update’ button is clicked:
    • + ADD ACTION > OnClick > EAV > Attribute > Update Attribute action is selected.
    • Parameters are taken from the Dynamic Form element:
      • Id → Symbol Picker > Action Result > Get Attribute > Id
      • Name → Symbol Picker > Form Component > Text Input
      • DataType → Symbol Picker > Form Component > SelectBox
      • Description → (optional)
      • IsRequired → (optional)
      • DefaultValue → (optional)
      • CategoryId → (optional)

4. Processing the Update Result

  • After a successful operation, a notification can be displayed to the user via toast or modal.
  • The Dynamic Form can be automatically cleared or the list can be updated.
Usage Scenario: Updating Attribute Details

An administrator wants to change the name, data type, or default value of an attribute previously defined in the system.

  1. The admin selects an attribute from the attribute list.
  2. The system displays the current information in the form using the Get Attribute action.
  3. The admin makes the necessary changes (for example, changes the name from reference_count to reference_number and leaves it as Integer).
  4. When the ‘Update’ button is clicked, the Update Attribute action runs and the attribute is updated in the system with its new values.
Update Attribute Action Advanced Customisations
  • Change Control: Only fields that are different between the old and new values can be updated.
  • Validations: Checks such as empty fields, invalid data types, or conflicting names can be performed before the action.
  • Conditional Updates: Update permissions can be granted based on specific user roles.

Technical Risks

  • Missing Required Fields: The system does not perform the operation if Id, Name or DataType are not entered.
  • Invalid Data Type: The system may return an error if an unsupported DataType is entered.
  • Conflicting Names: The system may reject the update if there is another attribute with the same name under the same category.
  • Beta Version Risk: The feature is in beta; unexpected behaviour may occur in some edge cases.

The Update Attribute action is used to ensure the sustainability of dynamic data structures on the Kuika platform. It allows users to quickly and securely edit attributes in the system. Although it is in beta, it offers powerful flexibility and manageability when configured correctly.

Other Related Content

No items found.

Glossary

No items found.

Alt Başlıklar