Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Fields have custom name when stored in database.

  • hakbar
  • hakbar's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago #185766 by hakbar
Hi,

I query from the database.

The fields come back in the format as shown below.

111111X2X9SQ004_SQ003

Is it possible to name these.

For example.

change the name to be Question1.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #185768 by tpartner
No, not without major (complete) hacking of the core code.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: hakbar
The topic has been locked.
  • gabrieljenik
  • gabrieljenik's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
5 years 4 months ago #185773 by gabrieljenik
Replied by gabrieljenik on topic Fields have custom name when stored in database.
Agree. Still, you could create a view for that table. Can you tell more about the use case?

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .

The following user(s) said Thank You: hakbar
The topic has been locked.
  • hakbar
  • hakbar's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago #185776 by hakbar
I am currently exporting the data from a MYSQL database and creating an xml file.

When I create the tags I use the keys I.e fields names.

This results in me creating an XML file with very confusing tags.

An example of some tags.

<21661X9X24SQ004_SQ001>Y</21661X9X24SQ004_SQ001>
<21661X9X24SQ004_SQ002>Y</21661X9X24SQ004_SQ002>
<21661X9X24SQ004_SQ003></21661X9X24SQ004_SQ003>

Would be useful to be able to name fields, so easier to cross reference.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
5 years 4 months ago - 5 years 4 months ago #185783 by DenisChenu
Replied by DenisChenu on topic Fields have custom name when stored in database.
Hi,

2 solutions
1. Use ExpressionManager : gitlab.com/SondagesPro/RemoteControl/rcA...olHandler.php#L49-60
2. Use a plugin helper : gitlab.com/SondagesPro/coreAndTools/getQ...eyCodeHelper.php#L69

You can try the API json export too …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
Last edit: 5 years 4 months ago by DenisChenu.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose