Forum Documentation Showcase Pricing Learn more

Editing dynamic data (custom types) in a plugin

Hi there!

Just one simple question :slight_smile: @emmanuel
Is there a way to edit dynamic data inside a plugin?
For example, give the plugin a custom object say “Person”, inside the plugin make changes of this custom type, then return the modified object in a state?

Thank you in advance :slight_smile:
Alexander

Welcome to the community!

There is a little workaround for this one:

1 Like

Hi @lottemint.md , actually this is not what I’m looking for :slight_smile:
I’m looking for a way to create a list of new objects accordingly to the given object and return this new list in a state. And all of this work in a generic plugins element action, not server-side.

@emmanuel maybe there is a solution? Or actually, there is in the plan to add this feature for the objects?
I’m talking about a new method. Beside the other methods like “get(propName)”, “listProperties()” I’m looking for a new method, something like “set(propName, value)”.

Thank you,
Alexander

It works for the client-side as well.

1 Like

@emmanuel can you give us your thoughts about this?)
Thank you.

Hi there again @lottemint.md .
It actually not working with element actions that publish states. I can return in a state original data given to the plug-in or clone of these. :frowning:

Maybe you can share what you have done?

Yeah, sure :slight_smile:

  1. Created plugin element, fields and state:

  2. Created API template and manually entered the response:
    image

  3. In the update action of the plugin I have entered this little piece of code:
    image
    yeah, the returned state is a list.

So now, when I’m trying to test it, I have in returned state 0 length list :frowning:
Maybe it is not do the deal for Client-Side actions :frowning:

Thank you all
Alexander

Hey,
Can you invite to your plugin, please?

My email:
[email protected]

Yeah sure @lottemint.md :slight_smile:

Just invited you, please check out the simplest code ever and let me know what is wrong with it? )

Thank you a lot :slight_smile:
Alexander

Thank you all =)
It works!

Thank you @lottemint.md for your help :star_struck:

Alexander

1 Like

@k6c8e4 I’m kinda in the same boat then you were. Do you mind sharing what has been fixed or giving access to your app?

Thanks