AWM data export

Hello everyone,

Ich hope you can help me here. Im my company, we are using an AWM to make it easier for end-users to enter some Information (without requiring too much thinking on that part). This worked quite well so far but now, we need a way to export the information from the AWM to processable data (e.g. csv or xls)

Is there a (convenient) way to achieve this? I also have access to the raw data from the database, but I don’t know, where the AWM data is stored. If you can point me in the right direction there, this would probably also already solve my problem.

With thanks and best regards,

I wouldn’t recommend reading the data directly from the database as it is spread in multiple tables. My advice is to:

Hope this helps,

Dear Marius,

Yes, I agree. So far, I can tell that the smaller widgets are stored in the xwikiStrings table while the Code Class is stored in the xwikiObjects table but tracing the whole APP is quite an adventure. I guess I can use the relation between the code class and strings but I will try the way you suggested first, since it sounds much less finicky.

It’s possible that I can come back with more questions once I am approaching this but so far, you have already my thanks for your guidance.

Best regards

Just in case, someone encounters the same issue, here was my solution approach.

In the end, I exported the data direktly via SQL querry, since it had to be post-processed electronically nonetheless.

The Link was made by the AWP class, by getting all the related objects to it. Linked on the ID flag of the objects table, you can get the matched in the properties table.

In the properties table, you will get the general widget name and the class where to look for the actual widget value.

Some sample SQL could look like this:

select xwp.* , case xwp_classtype when 'com.xpn.xwiki.objects.DateProperty' then cast ( (SELECT xws_value FROM public.xwikidates where xws_id = xwp_id and xws_name = xwp_name) as varchar(1000)) when 'com.xpn.xwiki.objects.FloatProperty' then cast ( (SELECT xwf_value FROM public.xwikifloats where xwf_id = xwp_id and xwf_name = xwp_name) as varchar(1000)) when 'com.xpn.xwiki.objects.IntegerProperty' then cast ( (SELECT xwi_value FROM public.xwikiintegers where xwi_id = xwp_id and xwi_name = xwp_name) as varchar(1000)) when 'com.xpn.xwiki.objects.LargeStringProperty' then (SELECT xwl_value FROM public.xwikilargestrings where xwl_id = xwp_id and xwl_name = xwp_name) when 'com.xpn.xwiki.objects.LongProperty' then cast ( (SELECT xwl_value FROM public.xwikilongs where xwl_id = xwp_id and xwl_name = xwp_name) as varchar(1000)) when 'com.xpn.xwiki.objects.StringProperty' then (SELECT xws_value FROM public.xwikistrings where xws_id = xwp_id and xws_name = xwp_name) when 'com.xpn.xwiki.objects.StringListProperty' then (SELECT xwl_value FROM public.xwikilargestrings where xwl_id = xwp_id and xwl_name = xwp_name) when 'com.xpn.xwiki.objects.DBStringListProperty' then xwlst.xwl_value else xwp_classtype end as xwp_value , xwlst.xwl_number as xwp_number FROM public.xwikiproperties xwp left join public.xwikilistitems xwlst on xwlst.xwl_id = xwp.xwp_id and xwlst.xwl_name = xwp.xwp_name and xwp.xwp_classtype = 'com.xpn.xwiki.objects.DBStringListProperty'

Of course, you will have to keep in mind, that the translation of the widget names (the “pretty names” have to be found in the translation page of your AWP class. The names are stored there as page-content, one entry per line.

I hope this will help someone in the future.

Anyway, thanks to @mflorea, who gave me the right direction by showing me the ER Diagram of the Database. This was a great help and speed up my implementation process a lot.

The Topic can be closed.

Thanks for posting back!

PS: Actually you’re the one with the power to close a topic by marking a response as solving the topic. Would be great if you could do that :slight_smile:

I didn’t know that. Thank you for pointing that out.

I marked my previous post now.