Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Combining two Survey tables in One table

Combining two Survey tables in One table 4 years 10 months ago #67382

  • wizard
  • wizard's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
New LimeSurvey User ( Must Say an excellent effort by developers of limesurvey )

Hello and Sorry if i posted my question in the wrong section.
Problem:

i m creating a survey on Leader and Rater basis.
first Leader will fill the survey and submit. and Its three referrals will fill the survey and submit.
the same will go on with 'N' leaders and 'N' referrals.
the real problem is how can i retrieve the data input by referrals of particular leader

ex:
Leader A and Referral A1 , A2, A3
Leader B and Referral B1,B2,B3

how can i combine the result of Leader A and its referrals in one table

Question User leader Referral A1 Referral A2 Referral A3
1~~~~~~~~~~A~~~~5~~~~~~~4~~~~~~~~~~~~3~~~~~~~~~~~1
2~~~~~~~~~~B~~~~3~~~~~~~5~~~~~~~~~~~~4~~~~~~~~~~~2


The problem is that the data is stored in random fashion .
if Referral B1 fills the data before A1 it will be difficult to retrieve data

is there any key in table through which i can connect Leader table with Raters table to get Referrals input of Particular Leader
Remember Leader and Rater table are different

Need Help, willing to <a href='http://<a href='donate.limesurvey.org'>donate</a>.limesurvey.org'><a href='donate.limesurvey.org'>donate</a></a>
any better solution
Last Edit: 4 years 10 months ago by wizard.
The administrator has disabled public write access.

Combining two Survey tables in One table 4 years 10 months ago #67386

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5977
  • Thank you received: 368
  • Karma: 260
1. Which Limesurvey version do you use?

2. Do you use tokens?

3. Do all users see the same questions?

4. How about adding additional questions asking for information to differentiate the data sets?

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
The following user(s) said Thank You: wizard

Combining two Survey tables in One table 4 years 10 months ago #67390

  • wizard
  • wizard's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
Thanks for your response

1.right now i m using Limesurvery 1.91+
2.Yes i m using token to make sure that only specific users can fill the survey
3. About the question there are two part of Survey
either the user is Leader or Rater ( who will assess his leader like peer and subordinates )

All the leaders will have same questions but different from Raters.

Example.
in leader survey.
i can take good decisive decision. Rate (1,2,3,4,5)
in Raters Survey.
he/she can take good decisive decision Rate (1,2,3,4,5)

4. Regarding information part there are limited options in lime survey in registration section or i dont know if there is any.

please can i have some method or any extra field in raters and leaders survey to separate leaders and it raters from others.
because i have to perform some analysis b/w single leader and its raters and on overall basis.
The administrator has disabled public write access.

Combining two Survey tables in One table 4 years 10 months ago #67391

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5095
  • Thank you received: 756
  • Karma: 227
Well, this should be easy. So you know already based on the tokens who is a rater of a specific leader.

What I still did not understand exactly: As you are talking about 2 different tables I assume you are using different surveys, right?

OK, here is what I would do, assuming that you have different surveys for leaders and for raters.

In the token table you can add custom attributes. Give each leader a code (this could be the same as the token of the leader, for example) and add it as a custom variable in the token table. Once people have finished the survey you can download the results and bring the raters to their leaders through matching this code.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

Combining two Survey tables in One table 4 years 10 months ago #67404

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5977
  • Thank you received: 368
  • Karma: 260
Is your survey set to be non anonymous?

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Combining two Survey tables in One table 4 years 10 months ago #67476

  • wizard
  • wizard's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
Yes it is NOT anonymous.

I m sorry 4 late response as i was out of station. It would be nice of u if u can help me out.

LimeSurvery Admirer
The administrator has disabled public write access.

Combining two Survey tables in One table 4 years 10 months ago #67490

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5977
  • Thank you received: 368
  • Karma: 260
If the survey is set to be non anonymous, you can simply add an additional "group" attribute and assign the users either a "leader" or "rater" value.
You can then put all questions into one survey and use conditions based on the additional attribute to only show the corresponding question for the group the current user belongs to.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Combining two Survey tables in One table 4 years 10 months ago #67551

  • wizard
  • wizard's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
Thanx Mazi but

can you tell how to add group attribute to survey to assign leader or rater value.

and if i set the survey to be Anonymous, do we have the solution to connect leader and its related raters survey values
The administrator has disabled public write access.

Combining two Survey tables in One table 4 years 10 months ago #67552

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5095
  • Thank you received: 756
  • Karma: 227
You can add two new custom attributes to each participant. One is the group of the leader they belong to and the second one would be the type (either leader or rater).

docs.limesurvey.org/Tokens&structure=Eng...ned_attribute_fields

The table would look something like that:

ID__Lead__type
01__0001__lead
02__0001__rate
03__0001__rate
04__0001__rate
05__0002__lead
06__0002__rate
07__0002__rate
08__0002__rate
09__0003__lead
10__...



001
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

Combining two Survey tables in One table 4 years 10 months ago #67557

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5977
  • Thank you received: 368
  • Karma: 260
wizard wrote:
and if i set the survey to be Anonymous, do we have the solution to connect leader and its related raters survey values
Caution: If you set the survey to be anonymous there will be NO connection between token data and survey answer data so the additional attribute workaround would be useless.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Combining two Survey tables in One table 4 years 10 months ago #67580

  • wizard
  • wizard's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
holch wrote:
You can add two new custom attributes to each participant. One is the group of the leader they belong to and the second one would be the type (either leader or rater).

docs.limesurvey.org/Tokens&structure=Eng...ned_attribute_fields

The table would look something like that:

ID__Lead__type
01__0001__lead
02__0001__rate
03__0001__rate
04__0001__rate
05__0002__lead
06__0002__rate
07__0002__rate
08__0002__rate
09__0003__lead
10__...



001

R u talking about adding attribute to Token table in a hard coded fashion about lead and type

is there a way, when a user starts survey it dynamically identify leader and sets its leader and type value
The administrator has disabled public write access.

Combining two Survey tables in One table 4 years 10 months ago #67583

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5977
  • Thank you received: 368
  • Karma: 260
@1: Yes, he is probably talking about hardcoding those values

@2: Based on what information should the survey system automatically determine the correct group?
Easiest solution would be to simply ask for the user type at an initial question.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Combining two Survey tables in One table 4 years 10 months ago #67589

  • wizard
  • wizard's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
Mazi wrote:
Based on what information should the survey system automatically determine the correct group?
Easiest solution would be to simply ask for the user type at an initial question.


My Survey Structure

Leader will fill survey & will rate himself &
their
Peer , Sub-ordinate and Boss[es] will fill survey and rate the leader

The Problem

Connect particular Leaders data with its RESPECTIVE Peer , subordinates ....

1. if i use hard coded values in token table than it's ok as suggested by Mazi and Holch

but if i want at run-time user before starting a survey to fill a question about his position (i.e peer,subordinate Or boss)

how can i add this information into database Or token table?
Last Edit: 4 years 10 months ago by wizard.
The administrator has disabled public write access.

Combining two Survey tables in One table 4 years 10 months ago #67601

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5977
  • Thank you received: 368
  • Karma: 260
You can't add data at a token table from inside a survey.

If you want to add the position information before the actual survey then you can create a second survey, ask the question there and then pass that data by end URL to a hidden question at the second survey. I just posted a similar solution here: www.limesurvey.org/en/forum/can-i-do-thi...vey-to-another#67585

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
The following user(s) said Thank You: wizard

Combining two Survey tables in One table 4 years 10 months ago #67654

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5095
  • Thank you received: 756
  • Karma: 227
Well, somehow you need to write the type into the database. Either you have that in the token table, then the respondent doesn't need to do anything. It is already saved to which leader the link belongs and whether the person responding is the leader itself or a rater. If you have the data already, then it is better to do it this way.

However, you could also ask in one of the first questions if the person is a leader or a rater and then in the next question, which leader it they are or they are gonna be rating.

However, with this method there is always the risk, that they choose wrongly (willingly or by mistake).
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.522 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form