Server Action
Question
Application Type
Reactive

Hi,

How can I transform/commute this in a server action? 

mvp_badge
MVP

Hi,

you can just copy this action and paste in a server action.

but after you need to some changes accordingly .


for example? can you help me?

is something like this ok?


Hello Brayan,

While there is no logic in the action for it to be a server action (instead of a client action), I assume you need to reuse it. If so, your server action is good, but ShowContenuto boolean variable needs to be converted into an output parameter because you need to return it to the calling action to use it for e.g. in the UI.

Question - Is Rapporto.InsertContent a boolean attribute?
If Yes, then you can directly assign it to ShowContenuto without the 'if' widget.
If No, then maybe it should be a boolean attribute.

Just sharing a few thoughts in case it helps.

Regards,

AJ


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