How to Add a New Entity to Entity Selection

I have one question

How to Add a New Entity to Entity Selection

I placed a matrix inside a web form and an entity text input below it

I placed a save button below it, and after selecting the list, I modified the data of the text input and the update was successful.

スクリーンショット 2023-10-03 22.27.22

Next, I placed a button for create a new entity.
I can’t do it well

スクリーンショット 2023-10-04 10.44.16

What am I doing wrong?

After that, I continued to test and I found out how to do it well

Click the Create new entity button, then click the save entity button
New registration is now possible

However, after clicking the save entity button, it is not reflected in the list.
Click the reload button to reflect

To reflect the list immediately after clicking the save entity button
What should I do?

By adding another On click event and making the target the current tab, it is now possible to update
however it takes a long time to refresh
This time I would like to update it while keeping the screen
I believe there is surely a way

Hello Caos,

To refresh the list or the matrix in order to see if the new entity is been created successfully, you need to add another standard action for reloading the entity selection in the button “Save” after the standard action for saving the new entity, and then you can see the new list or matrix after adding that new entity.

is there a way to complete the sequence via a cs or ds function?

Hi Mikey,

You can do it by using functions from dataclasses:

-For "Save, you can create a function and use to create the new entity.
-And for “Reload”, you can create a function inside the dataclass, use this.all() to load all the entities from the dataclass (entity selection) and bind the return of the function with the datasource that represents the entity selection.

But to optimize things, using standard actions for saving or reloading is better than using functions.