0

I have some webform portlet used, for example to ask users if the experience in the website was good. Now I need to get the web form values and create a table to show them. I know that data are stored in liferay's DB in the Exapando (tables, ros, column, values). The problem is that i can't find web form name. In Expandotable it is stored like 1_WAR_webformportlet_INSTANCE_... but I want the name that appear in browser ("MY FORM" for example).

Hope that someone can help me...

PS: I'm Using ExpandoTableLocalServiceUtil in JAVA.

IDKN
  • 13
  • 3

1 Answers1

0

The Expando API mimics tables and you can find various other Expando* API classes that you will need in order to extract the right data. It's not the most intuitive way to run reports on the data, as it's largely built to store extra values for existing entities.

That being said, once you have a proper id from the ExpandoTable of your choice, you can query the ExpandoColumn and ExpandoRow APIs, and in turn the ExpandoValue API (add LocalServiceUtil to all) to get the proper values.

Then, of course, you'll need to render these values in your HTML output.

Web Forms can also be exported as CSV, you could use that output, or you can look at that code, as it also reads all of the data for a form.

I can't go without: You mention Liferay 6.0 and tag Liferay 6.2. Both are horribly outdated - please run more current software on a public facing website.

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90
  • I really thank you for the answer. I'm doing this: `List list = ExpandoTableLocalServiceUtil.getTables(comId, tabId);` but it return me the name `1_WAR_webformportlet_INSTANCE_...` and i can't use this name. I'm searching to find a way to have webform's name like liferay when set the file csv name. It set the csv file like "webform-test" if the form is called like this. You talked about seeing the code of liferay that use to create the .csv file... how can i do that? I really thank you if you could help me another time! PS: it is not a new project unfortunately – IDKN Apr 30 '21 at 13:51