522
Views
5
Comments
How to use server action in screen as function (mobile)
Question

i've done to make server action on mobile apps but i can't use this server action as function in screen.

So,how to use server action in screen as function  ?


Thanks


datetimepretty.jpg
UserImage.jpg
robby duta

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Robby,

Unfortunately, due to the nature of functions it's not possible to use a server action as a function or call a server action inside a local function. If you try to do so, you get the following TrueChange error:

(Where 'ServerDataSync' will be the name of your Server Action, and 'TestFunc' the name of your local function.) Iirc, this has to do with the way Server Actions are called (asynchronously) vs. the way Functions are handled (Synchronously).

UserImage.jpg
robby duta

UserImage.jpg
robby duta

but in my case,the error is not same with you

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Robby,

The error you get is because "DateTime_PrettyFormat" is not a known local function. The error I have is caused by defining a local function that calls a server function.

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