1726
Views
6
Comments
Solved
creating client action to save form
Question

Hi there I'm trying to create a client action to be able to submit this form below. Can someone please advise me on this. 


Kind Regards

2023-03-09 07-10-59
Vipasha Sharma
Solution

Hi Shaan,

Just use "CreateOrUpdate" action to create/update the entity respectively into the "True" section of if as shown in below figure and into the "False" section just put the error message as per your requirement

Hope this will help you

Regards,

Vipasha

2020-05-07 18-53-00
Rui Barradas
 
MVP

Hello Shaan,

As said in the description, you should add custom validations for your input widgets (if applicable).

After the check, you should call a Server Action to save the data into the database, in your respective Entity where the data will be stored.


Kind regards,

Rui Barradas

2023-03-09 07-10-59
Vipasha Sharma
Solution

Hi Shaan,

Just use "CreateOrUpdate" action to create/update the entity respectively into the "True" section of if as shown in below figure and into the "False" section just put the error message as per your requirement

Hope this will help you

Regards,

Vipasha

2023-03-09 07-10-59
Vipasha Sharma

As you are using "client" side validation you need to explicitly mention the feedback messages if input given to you form is not proper.

"form1.valid" is a check to ensure the input are given to all mandatory fields and all inputs given are as per the data type. If any of the value is in correct then it will follow the "False" path otherwise it will follow the "True" path

Regards,

Vipasha

2021-08-12 11-00-27
Nordin Ahdi
 
MVP

Hi Shaan,

The following training should give you all the information you need in order to understand how to build a Reactive Web Form and submit data.

Hope you find it helpful.

Regards,

Nordin

2021-06-09 13-39-18
Agno Silveira
 
MVP

Hi Shaan,

You can see how to solve your case, and lear more in this link.

It is very interesting to attend classes, I advise.

Regards!

UserImage.jpg
Jason Brown

Yes, this works. But the application throws a security warning because you are running your CreateOrUpdate CRUD action in a client action, not a server action. But nowhere in the training (including the link provided) is it explained what to place in the 'Source' of the CreateOrUpdate action. 

Here I will explain the correct way. You need to create a custom server action.
1.) In the logic tab, right click on Server Actions and create a new server action.

I called mine CreateOrUpdateForecast

2.) Now go back to your form and double-click your save button (not the text) to show your save action flow.
3.) Drag your custom action into the flow after the validation.

4.) Now you can add input parameters to this custom action because it is in the context of your form.

5.) Single-click on the server action and now notice that in the interface pane you will see the properties of your server action.

6.) For each attribute, click the down-arrow on the 'new argument' dialog box and select that attribute. You have to do this for each input in the form.

7.) Now double-click on that action that you just modified so that the new action appears. You can do whatever you want here, like server-side validation, etc. But make sure you add the correct CRUD action here. Navigate to the data tab and drag/drop the right action to the flow.



8.) Now the CRUD action will still want a 'Source.' But now you can just click the drop-down and use the suggested Source which is the one you just defined.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.