Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Combining two Survey tables in One table

Re: Combining two Survey tables in One table 3 years 1 month 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.

Re: Combining two Survey tables in One table 3 years 1 month ago #67583

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5426
  • Thank you received: 307
  • Karma: 252
@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.

Re: Combining two Survey tables in One table 3 years 1 month 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: 3 years 1 month ago by wizard.
The administrator has disabled public write access.

Re: Combining two Survey tables in One table 3 years 1 month ago #67601

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5426
  • Thank you received: 307
  • Karma: 252
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

Re: Combining two Survey tables in One table 3 years 1 month ago #67654

  • holch
  • holch's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2961
  • Thank you received: 381
  • Karma: 124
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.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.120 seconds
Donation Image