A bit of guidance needed - Datastore to server action

We have to standardize posting of any store data to server connect. Maybe @patrick can add more actions for this

1 Like

hello @George ,
It’s a really cleverly feature. Do you plan to add this feature soon. or will it take some more time?
of course if posible

Also bumping this too, hidden form fields are a bit tiresome for larger amounts of datastore data

2 Likes

bumping this request please.

1 Like

Me too, didn’t see this before making the below post as searched the forum a dozen times… Then lost the plot entirely…

Thanks for the heads up.

@patrick is already researching for better way to just post a data store record directly to a server connect action as input.

So that this can be easily achieved with an action of the data store itself.

5 Likes

Yes, I posted about the same thing last week and wasn’t able to find this post either. I can invent my own way but would prefer to use a good Wappler way!

What would be great is just one tutorial of what is possible at the code level right now. Reading through and trying to understand everyone’s different examples is driving me crazy and not giving me an answer!

2 Likes

We have just managed to do this. Will do a write up later. Quite simple, all came down to input names in our circumstance (finally we bound dynamic names to each input using the index). In the Multi-Insert (the array within the SC Action) the ‘record array’ variables must be named the same as the local storage items. That is about it… And obviously the insert variables must be named the same as the local storage items…

2 Likes

Fabulous @Dave!
Can’t wait to hear how you did it… I definitely need this functionality this week!

Please please oh pretty please can someone explain how to do this?
@Teodor?
@patrick?
@Dave if you have a moment to spare?

Antony, it’s the same method we discussed on your other thread, you need to bind the name of the datastore field with the [{{index}}] to a form input within a repeat.

You can hide the repeat/input if you don’t want it visible to your user.

Give me a few minutes and I will publish an example.

2 Likes

Hopefully this will make sense:

It was rushed so may need to be polished a bit.

Hi Antony, its pretty much as I have outlined above mate. Took some working out but in the end is quite simple, literally as above. Could quite easily over complicate it if I were to write a guide as I tend to waffle… :slight_smile:

Thanks @dave!

No worries, as @max_gb wrote the guide from heaven… see the link in the post above!

A new “Form Data” component was added to the latest Wappler version and it makes sending complex data structures to the server side really easy:

1 Like

Thanks, Teodor! This makes using the data store a tool I can use more often, reducing actions needed to get this data to the server action.

Thanks again,
Ray

1 Like