- Posts: 162
- Thank you received: 14
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Panel Integration Not Saving parameter
- teracomp
- Topic Author
- Offline
- Elite Member
Less
More
7 years 4 months ago - 7 years 4 months ago #145028
by teracomp
Dave Phillips
Panel Integration Not Saving parameter was created by teracomp
Before I submit this as a bug, I wanted to be sure I'm not doing something wrong.
I have a page that collects information, creates a user, then sends that user to the survey I created. The link looks like this:
On the survey, I created an optional longtext question that is hidden, then used Panel Integration to capture userid.
On the Panel Integration section, when I save userid, mapped to the userid question, the page refreshes and there is text that indicates all has been saved, but when I return to the Panel Integration pane, it is blank (see screenshot).
For the end URL, I provided this link, but {PASSTHRU:userid} is blank, nothing shows up at all:
The result for the link above was:
I looked up the field name in the database (to be sure data was actually getting there) and changed the end url to:
That code works, but only after trying several revisions, there are 4 null entries for the first attempts.
I've attached the lss survey I'm using to test this out before deploying to a much larger instrument. Greatly appreciate some advice here.
I have a page that collects information, creates a user, then sends that user to the survey I created. The link looks like this:
Code:
URL on the way in: https://url.example.com?token=dummyuser&userid=8
On the Panel Integration section, when I save userid, mapped to the userid question, the page refreshes and there is text that indicates all has been saved, but when I return to the Panel Integration pane, it is blank (see screenshot).
For the end URL, I provided this link, but {PASSTHRU:userid} is blank, nothing shows up at all:
Code:
https://targeturl.example.com/app/#/submission/{SAVEDID}/{PASSTHRU:userid}
Code:
Link created on the way out: https://targeturl.example.com/app/#/submission/5/
Code:
https://hgctools.example.com/app/#/submission/{SAVEDID}/{INSERTANS:996399X60X2868}
I've attached the lss survey I'm using to test this out before deploying to a much larger instrument. Greatly appreciate some advice here.
Dave Phillips
Attachments:
Last edit: 7 years 4 months ago by DenisChenu. Reason: Usage of example.com please
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10098
- Thank you received: 3589
7 years 4 months ago - 7 years 4 months ago #145042
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Panel Integration Not Saving parameter
I have no problem with the latest version (2.56.1). Please update and retest before filing a bug report....but when I return to the Panel Integration pane, it is blank (see screenshot).
If you've saved to a question with code "userid", I'm not sure you need the "PASSTHRU:" bit. Try:For the end URL, I provided this link, but {PASSTHRU:userid} is blank, nothing shows up at all:
Code:
https://targeturl.example.com/app/#/submission/{SAVEDID}/{userid}
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 7 years 4 months ago by DenisChenu. Reason: Usage of example.com please
The topic has been locked.
- teracomp
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 162
- Thank you received: 14
7 years 4 months ago #145044
by teracomp
Dave Phillips
Replied by teracomp on topic Panel Integration Not Saving parameter
I did update: Version 2.56.1+161118, but I didn't clear my cache. Rookie mistake. Once I cleared the cache, the Panel Integration section shows up correctly. I'll test to verify, but I suspect that was the issue.
I'm interested in your second statement. If I supply a variable on the querystring that matches a question code, does this added to the survey response?
I'm interested in your second statement. If I supply a variable on the querystring that matches a question code, does this added to the survey response?
Dave Phillips
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10098
- Thank you received: 3589
7 years 4 months ago #145046
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Panel Integration Not Saving parameter
My second statement refers to the end URL, not the survey URL. I made the assumption that in Panel Integration, you mapped a "userid" parameter to a "userid" question.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- teracomp
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 162
- Thank you received: 14
7 years 4 months ago #145047
by teracomp
Dave Phillips
Replied by teracomp on topic Panel Integration Not Saving parameter
Yes indeed, I mapped it to the userid question and it was working even though it didn't show up in the Panel Integration section. I added it back now (after clearing cache) and it now shows up as {PASSTHRU:userid} as well as {INSERTANS:996399X60X2868}.
It appears that I can populate question answers with query vars. I didn't know that was feature. Is this a valid assumption?
To test, I added {PASSTHRU:username} and it shows up on the end URL as expected. That's good, but can I display {PASSTHRU:username} on the welcome screen?
I tried that and EM marks it in red and, of course, it doesn't work as a result. I also tried to see {userid} and {PASSTHRU:userid}, but those don't appear on the welcome screen either.
It appears that I can populate question answers with query vars. I didn't know that was feature. Is this a valid assumption?
To test, I added {PASSTHRU:username} and it shows up on the end URL as expected. That's good, but can I display {PASSTHRU:username} on the welcome screen?
I tried that and EM marks it in red and, of course, it doesn't work as a result. I also tried to see {userid} and {PASSTHRU:userid}, but those don't appear on the welcome screen either.
Dave Phillips
The topic has been locked.
- teracomp
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 162
- Thank you received: 14
7 years 4 months ago #145048
by teracomp
Dave Phillips
Replied by teracomp on topic Panel Integration Not Saving parameter
For what it's worth, I've been reading:
manual.limesurvey.org/URL_fields#Prefill...d_hidding_the_answer
to find the answer.
It appears that I should be able to see {userid} within the survey since it's included as a question code and a Panel Integration param by adding {userid.shown}, but this userid does not appear...which makes me believe {username.shown} will not work as well, even when i map it to the longText question field.
I guess I should stop adding to this thread since my question is now, how do I show Panel Integration vars within the survey.
It appears that I should be able to see {userid} within the survey since it's included as a question code and a Panel Integration param by adding {userid.shown}, but this userid does not appear...which makes me believe {username.shown} will not work as well, even when i map it to the longText question field.
I guess I should stop adding to this thread since my question is now, how do I show Panel Integration vars within the survey.
Dave Phillips
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10098
- Thank you received: 3589
7 years 4 months ago - 7 years 4 months ago #145050
by tpartner
See the attached survey. It has the panel integration we have discussed. If you append ?userid=12345 to the survey URL, it will:
1) be recorded in the "userid" question
2) be shown in an text-display question
3) be appended to the end URL.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Panel Integration Not Saving parameter
You can simply use the Expression Manager variable for the question that the parameter is stored in (in this case, "userid")....how do I show Panel Integration vars within the survey.
See the attached survey. It has the panel integration we have discussed. If you append ?userid=12345 to the survey URL, it will:
1) be recorded in the "userid" question
2) be shown in an text-display question
3) be appended to the end URL.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last edit: 7 years 4 months ago by tpartner.
The following user(s) said Thank You: teracomp
The topic has been locked.
- teracomp
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 162
- Thank you received: 14
7 years 4 months ago #145052
by teracomp
Dave Phillips
Replied by teracomp on topic Panel Integration Not Saving parameter
Thanks for the details. I see how it works and I'll be able to implement it appropriately.
The only place this doesn't work is on the Welcome screen. This is odd to me, but I can change my workflow to hide the welcome screen and create a text question with the welcome info. I'll also create text questions for each parameter to allow me to show the username.
The only place this doesn't work is on the Welcome screen. This is odd to me, but I can change my workflow to hide the welcome screen and create a text question with the welcome info. I'll also create text questions for each parameter to allow me to show the username.
Dave Phillips
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10098
- Thank you received: 3589
7 years 4 months ago #145057
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Panel Integration Not Saving parameter
It doesn't work on the welcome screen because the param has not been loaded into a question yet (no questions exist at that point).
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- teracomp
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 162
- Thank you received: 14
7 years 4 months ago #145115
by teracomp
Dave Phillips
Replied by teracomp on topic Panel Integration Not Saving parameter
I've been working for hours on this seemingly simple issue. Still no joy.
Here is the process. Please tell me what I'm doing wrong.
I imported your Test 1 survey and changed it from Group By Group to Question By Question. That's the only change. Activate the survey, create dummy user, modify the token, run the test and everything works fine.
I modified the survey to add a username, hide the group, added a results group to simulate the survey (attached)
Activate the survey, create dummy user, etc., run the test an nothing works. No userid, no username.
hgctools.com/limesurvey/index.php/969829...name=Dave%20Phillips
Really need to know what I'm doing wrong here. I have two instruments in beta today because I thought this was straight-forward. One works, the other doesn't.
Here is the process. Please tell me what I'm doing wrong.
I imported your Test 1 survey and changed it from Group By Group to Question By Question. That's the only change. Activate the survey, create dummy user, modify the token, run the test and everything works fine.
I modified the survey to add a username, hide the group, added a results group to simulate the survey (attached)
Activate the survey, create dummy user, etc., run the test an nothing works. No userid, no username.
hgctools.com/limesurvey/index.php/969829...name=Dave%20Phillips
Really need to know what I'm doing wrong here. I have two instruments in beta today because I thought this was straight-forward. One works, the other doesn't.
Dave Phillips
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10098
- Thank you received: 3589
7 years 4 months ago #145119
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Panel Integration Not Saving parameter
I think that by hiding the group with relevance == 0, you have basically rendered all questions in the group irrelevant.
I would run the survey in group-by-group and hide the panel questions with the "Always hide this question" advance setting or CSS instead of with relevance.
I would run the survey in group-by-group and hide the panel questions with the "Always hide this question" advance setting or CSS instead of with relevance.
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: teracomp
The topic has been locked.
- teracomp
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 162
- Thank you received: 14
7 years 4 months ago #145120
by teracomp
Dave Phillips
Replied by teracomp on topic Panel Integration Not Saving parameter
Thanks tpartner for your quick response.
I have to run in Question by Question mode, but Hiding the question appears to be the secret answer. In another forum thread (some weeks ago), I read about skipping the group by changing the relevance to 0. I thought this was a clever way of hiding a group of demographic data I was collecting on the form that launches the survey. So...apparently, that is a very BAD idea for production (while good for testing).
I set relevance to 1 on the group, then set Hide This Question to true on all of the group's items. When I load the URL with parameters, it works!
Now to recover the last 5 hours. Learning more each day. Thanks again.
I have to run in Question by Question mode, but Hiding the question appears to be the secret answer. In another forum thread (some weeks ago), I read about skipping the group by changing the relevance to 0. I thought this was a clever way of hiding a group of demographic data I was collecting on the form that launches the survey. So...apparently, that is a very BAD idea for production (while good for testing).
I set relevance to 1 on the group, then set Hide This Question to true on all of the group's items. When I load the URL with parameters, it works!
Now to recover the last 5 hours. Learning more each day. Thanks again.
Dave Phillips
The topic has been locked.