Save data from an entire page

Save data from an entire page

  

Hi !

In my application I have a page which contains several widgets. I first have a form and then i have an editor (TinyMCE). My problem is that I want to save the data from my entire page (form and editor) but with my button Save I am just able to save the data from my form and not the ones in my TinyMCE editor.

Any ideas to help me figure it out ? 

Hi Marion,

Is your Tinymce editor initialized on a text area generated by outsystems? 

Do you have a sample OML you can share to help troubleshoot?

Thanks,

Justin

Hi Justin,

Yes my Tinymce editor is initialized on a text area generated by Outsystems (see pictures).

This is my page (Accordion).

For exemple I want to save the data I will be writting in Solution text area (see after the details of this widget)


And then my issue is that I don't really know what to put in the "save" button for the moment I have an action that save the data of my form (first part of the accordion). But I don't know how to save the data in the text area related to my TinyMCE editor.




Other pictures :






An finally my "Save" button action :

And the preparation of this screen :

How if you directly type to the text area. Is the value saved? The attribute entity must be associated with the widget (text area) - check the widget name, its variable, etc.


regards,

bb

Solution

Hi Marion,

Is there a solution attribute on the Incident record? If so, you should set the variable of the SolutionInput text area to the Form.Record.Solution, not the local variable 'Solution', this way when you save the form record in your save action, the solution text area value will also be saved.

Otherwise, you need to assign the solution local variable data equal to what ever attribute you want it saved in, in the record you are passing to the CreateOrUpdate action, before you call the CreateOrUpdate, so that it has the value.

But I am pretty sure, in your circumstance, option 1 is what you are looking for.

Let me know if you have any trouble,

Justin

Solution

Thank Justin for your answer. 

I set the variable as you suggest 

Now when I write something in my editor and click save I can still see it written. But when I go back to my table record (Incident) and click again on the same detail incident my text is gone.

Do you have any idea how to solve this issue ?

Marion


Hi Marion,

Do you see it saving to the correct record or is it saving a new record? There's a few things I can think of but they would just be ideas at this point. 

Is the OML available to be shared so that I can take a look at your specific case?

Thanks,

Justin

marion plaisant wrote:

Thank Justin for your answer. 

I set the variable as you suggest 

Now when I write something in my editor and click save I can still see it written. But when I go back to my table record (Incident) and click again on the same detail incident my text is gone.

Do you have any idea how to solve this issue ?

Marion



Try to put "commit" after saving.

Hi Justin,

Actually it works with your method. My issue was that my "save" button had a "Ajax Submit" method but with the editor it requires Submit method.

Thanks again,

Marion

Hi !

I have now an other issue. I have a table record of incidents and when I change the text in the editor in one incident of the table it's now correctly saved but it's saved in all my incidents in the table record

Any idea how to fix this ?

Marion