I am struggling to show data in a modal window

Hi team,

I want to show data from a database in a modal window (the Component from the Marketplace), edit it in the modal window and save it on close of the modal window.

I cannot show data in the modal window in my textarea, because if it is not visible the field is not defined and I cannot push something into the value field. I have tried it with a text field and bound the content to a Page Data field but then the changes were not saved in the database, because the field is bound to the modal data model.

If you could point me in the right direction that would be great?

Regards, Joerg

Hi @Jorg_Beyer

Have you tried using the Modal data model to save data in the OnClose handler?

Regards,
Vlad

Hi,

I tried to use the Modal data model but I cannot make sense of it. If I look at the content of the data model I cannot see any data but a lot of methods.

How can I use it?

Regards, Joerg

As far as I understand you have data-binging linking to the modal data model, don’t you?

No, to the Page Data model. I cannot use the Modal data model as this is not available until the modal is open. And I have no idea how to access the Modal data model.

Hi @Jorg_Beyer
Not sure this will be helpful to you but I use such logic to display data from Page Data in modal.
I.e. I have repeater displaying multiple entries, and once user taps on one of it:
image

he will get modal displayed with some values in it:


This logic is attached to modal. I think this way you can pass it to/from data models.

1 Like

Hi Uldis, this is a good idea and so obvious. This will work.
Thanks.

Regards, Joerg

Hi @Uldis_Borkus

Thanks for sharing this!

1 Like