Hi there.
I want to add a form on my homepage that creates a new entry into my current database, and then updates the entry. However, I have only been able to figure out how to EDIT an existing / current record, rather than create a new one using a form via the outsystems guided paths.Help with this would be very much appreciated.
Hi,
The aggregate you are giving to the form's source, make its fetch property to "On Demand" and also you can clear the form data after creating the data.
If the screen is rendering from one screen to another screen then you can use Entity.Id = Nullidentifier() as mentioned by Jose Goncalves.
Regards,
Komal
You need to open the URL with the Id parameter = NullIdentifier()
like this: ... ProductColorDetail?ProductColorId=0
Hi Jose and Joshua,
@Jose Goncalves This would not work as the OP is working on a Reactive Web App.
Furthermore, it is best practice to pass NullIdentifier() instead of 0 to the EntityId parameter of the screen in order to create a new record.
Hope this helps.
Nordin
EDIT: the post was corrected by Jose.
Yes, I meant 0 in the URL but oc using nullidentifier() as the parameter. Thanks for the note.
No problem. The note was more about having the .aspx extension in the URL which only works for Traditional Web Apps.