direct one condition to an external link?


Author
Message
xizhouxie
xizhouxie
Respected Member (438 reputation)Respected Member (438 reputation)Respected Member (438 reputation)Respected Member (438 reputation)Respected Member (438 reputation)Respected Member (438 reputation)Respected Member (438 reputation)Respected Member (438 reputation)Respected Member (438 reputation)
Group: Forum Members
Posts: 24, Visits: 104
We are currently trying to develop a study with the following two conditions. The first condition will be done once they complete the Inquisit survey. In the second condition, we need participants to be redirected to an external webpage once they finish the Inquisit survey. Is there any way we can do that? I tried imbedding the website within inquisit, but that was extremely clunky and there was no way to click anything.
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
xizhouxie - 3/11/2020
We are currently trying to develop a study with the following two conditions. The first condition will be done once they complete the Inquisit survey. In the second condition, we need participants to be redirected to an external webpage once they finish the Inquisit survey. Is there any way we can do that? I tried imbedding the website within inquisit, but that was extremely clunky and there was no way to click anything.

Yes, you can do that by setting the defaults.finishpage property to the external URL in the one condition, but not the other. I.e. if you have two <expt>s for the respective conditions, do

// condition 1: No redirection
<expt>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
...
</expt>

// condition 2: Redirect to external URL
<expt>
/ onexptend = [
    defaults.finishpage = concat("https://www.example.com/?subjectid=", script.subjectid);
]
/ subjects = (2 of 2)
/ groupassignment = groupnumber
...
</expt>


If you are running things via <batch>, the defaults.finishpage ought to be set at the end of the batch instead:

// condition 1: No redirection
<batch>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
...
/ file = "condition1.iqx"
</batch>

// condition 2: Redirect to external URL
<batch>
/ subjects = (2 of 2)
/ groupassignment = groupnumber
...
/ file = "condition2.iqx"
/ onscriptend = [if (batch.2.currentscript == "condition2.iqx") defaults.finishpage = concat("https://www.example.com/?subjectid=", script.subjectd);]
</batch>

xizhouxie
xizhouxie
Respected Member (438 reputation)Respected Member (438 reputation)Respected Member (438 reputation)Respected Member (438 reputation)Respected Member (438 reputation)Respected Member (438 reputation)Respected Member (438 reputation)Respected Member (438 reputation)Respected Member (438 reputation)
Group: Forum Members
Posts: 24, Visits: 104
Dave - 3/11/2020
xizhouxie - 3/11/2020
We are currently trying to develop a study with the following two conditions. The first condition will be done once they complete the Inquisit survey. In the second condition, we need participants to be redirected to an external webpage once they finish the Inquisit survey. Is there any way we can do that? I tried imbedding the website within inquisit, but that was extremely clunky and there was no way to click anything.

Yes, you can do that by setting the defaults.finishpage property to the external URL in the one condition, but not the other. I.e. if you have two <expt>s for the respective conditions, do

// condition 1: No redirection
<expt>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
...
</expt>

// condition 2: Redirect to external URL
<expt>
/ onexptend = [
    defaults.finishpage = concat("https://www.example.com/?subjectid=", script.subjectid);
]
/ subjects = (2 of 2)
/ groupassignment = groupnumber
...
</expt>


If you are running things via <batch>, the defaults.finishpage ought to be set at the end of the batch instead:

// condition 1: No redirection
<batch>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
...
/ file = "condition1.iqx"
</batch>

// condition 2: Redirect to external URL
<batch>
/ subjects = (2 of 2)
/ groupassignment = groupnumber
...
/ file = "condition2.iqx"
/ onscriptend = [if (batch.2.currentscript == "condition2.iqx") defaults.finishpage = concat("https://www.example.com/?subjectid=", script.subjectd);]
</batch>

Thanks Dave. I will try that and report back. Is the subjectid in the link necessary? They are going to another page where they need to sign in, so we won't need their subjectid to link the data.
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
xizhouxie - 3/11/2020
Dave - 3/11/2020
xizhouxie - 3/11/2020
We are currently trying to develop a study with the following two conditions. The first condition will be done once they complete the Inquisit survey. In the second condition, we need participants to be redirected to an external webpage once they finish the Inquisit survey. Is there any way we can do that? I tried imbedding the website within inquisit, but that was extremely clunky and there was no way to click anything.

Yes, you can do that by setting the defaults.finishpage property to the external URL in the one condition, but not the other. I.e. if you have two <expt>s for the respective conditions, do

// condition 1: No redirection
<expt>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
...
</expt>

// condition 2: Redirect to external URL
<expt>
/ onexptend = [
    defaults.finishpage = concat("https://www.example.com/?subjectid=", script.subjectid);
]
/ subjects = (2 of 2)
/ groupassignment = groupnumber
...
</expt>


If you are running things via <batch>, the defaults.finishpage ought to be set at the end of the batch instead:

// condition 1: No redirection
<batch>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
...
/ file = "condition1.iqx"
</batch>

// condition 2: Redirect to external URL
<batch>
/ subjects = (2 of 2)
/ groupassignment = groupnumber
...
/ file = "condition2.iqx"
/ onscriptend = [if (batch.2.currentscript == "condition2.iqx") defaults.finishpage = concat("https://www.example.com/?subjectid=", script.subjectd);]
</batch>

Thanks Dave. I will try that and report back. Is the subjectid in the link necessary? They are going to another page where they need to sign in, so we won't need their subjectid to link the data.

Then it's not necessary.
abalbert
abalbert
Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)
Group: Forum Members
Posts: 6, Visits: 22
Hi Dave/Administrators,
I am new to Inquisit Web and trying to do something similar to the above, but am having difficulty adjusting the script to my needs.
I have an experiment with two groups. They start off at different Qualtrics surveys, and then are sent to Inquisit from there, with participant ID and group ID (either group 1 or group 2) carried forward in the URL. Each group will complete the corsi block task, but only group 1 will complete the digit symbol task. When each group finishes their Inquisit tasks, I want them to be redirected again to two different Qualtrics URLs based on their original group membership (group 1 goes to one URL, group 2 goes to another). I've got all the other parts working, but cannot seem to make this redirection to different URLs after completion of the Inquisit tasks work, after several attempts at adjusting the code in different ways. Would you be able to help me with this?
Here is my code right now (with fake URLs). Currently it is giving me an error message that says "'script.groupid, 2' The expression contains an unknown property"

// session 1 groups 1 & 2
<batch>
/ file = "corsiblocktappingtask.iqx"
/ file = "group1_vs_group2.iqx"
/ sessions = (1 of 1)
/ onscriptend = [if(script.groupid, 2 == 1) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group1part2"); ]
/ onscriptend = [if(script.groupid, 2 == 2) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group2part2"); ]
</batch>

See contents of the file "group1_vs_group2.iqx" also below. Maybe there is a way to add the different finish page URL to this script, as it's already describing a modification based on group ID?

<include>
/ precondition = [
    mod(script.groupid, 2) == 1;
]
/ file = "digitsymbolsubstitutiontask_test1.iqx"
</include>



Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
abalbert - 2/8/2021
Hi Dave/Administrators,
I am new to Inquisit Web and trying to do something similar to the above, but am having difficulty adjusting the script to my needs.
I have an experiment with two groups. They start off at different Qualtrics surveys, and then are sent to Inquisit from there, with participant ID and group ID (either group 1 or group 2) carried forward in the URL. Each group will complete the corsi block task, but only group 1 will complete the digit symbol task. When each group finishes their Inquisit tasks, I want them to be redirected again to two different Qualtrics URLs based on their original group membership (group 1 goes to one URL, group 2 goes to another). I've got all the other parts working, but cannot seem to make this redirection to different URLs after completion of the Inquisit tasks work, after several attempts at adjusting the code in different ways. Would you be able to help me with this?
Here is my code right now (with fake URLs). Currently it is giving me an error message that says "'script.groupid, 2' The expression contains an unknown property"

// session 1 groups 1 & 2
<batch>
/ file = "corsiblocktappingtask.iqx"
/ file = "group1_vs_group2.iqx"
/ sessions = (1 of 1)
/ onscriptend = [if(script.groupid, 2 == 1) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group1part2"); ]
/ onscriptend = [if(script.groupid, 2 == 2) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group2part2"); ]
</batch>

See contents of the file "group1_vs_group2.iqx" also below. Maybe there is a way to add the different finish page URL to this script, as it's already describing a modification based on group ID?

<include>
/ precondition = [
    mod(script.groupid, 2) == 1;
]
/ file = "digitsymbolsubstitutiontask_test1.iqx"
</include>



/ onscriptend = [if(script.groupid, 2 == 1) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group1part2"); ]
/ onscriptend = [if(script.groupid, 2 == 2) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group2part2"); ]

is wrong, you want something like

/ onscriptend = [if(mod(script.groupid, 2) == 1) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group1part2"); ]
/ onscriptend = [if(mod(script.groupid, 2) == 0) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group2part2"); ]
abalbert
abalbert
Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)
Group: Forum Members
Posts: 6, Visits: 22
Dave - 2/8/2021
abalbert - 2/8/2021
Hi Dave/Administrators,
I am new to Inquisit Web and trying to do something similar to the above, but am having difficulty adjusting the script to my needs.
I have an experiment with two groups. They start off at different Qualtrics surveys, and then are sent to Inquisit from there, with participant ID and group ID (either group 1 or group 2) carried forward in the URL. Each group will complete the corsi block task, but only group 1 will complete the digit symbol task. When each group finishes their Inquisit tasks, I want them to be redirected again to two different Qualtrics URLs based on their original group membership (group 1 goes to one URL, group 2 goes to another). I've got all the other parts working, but cannot seem to make this redirection to different URLs after completion of the Inquisit tasks work, after several attempts at adjusting the code in different ways. Would you be able to help me with this?
Here is my code right now (with fake URLs). Currently it is giving me an error message that says "'script.groupid, 2' The expression contains an unknown property"

// session 1 groups 1 & 2
<batch>
/ file = "corsiblocktappingtask.iqx"
/ file = "group1_vs_group2.iqx"
/ sessions = (1 of 1)
/ onscriptend = [if(script.groupid, 2 == 1) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group1part2"); ]
/ onscriptend = [if(script.groupid, 2 == 2) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group2part2"); ]
</batch>

See contents of the file "group1_vs_group2.iqx" also below. Maybe there is a way to add the different finish page URL to this script, as it's already describing a modification based on group ID?

<include>
/ precondition = [
    mod(script.groupid, 2) == 1;
]
/ file = "digitsymbolsubstitutiontask_test1.iqx"
</include>



/ onscriptend = [if(script.groupid, 2 == 1) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group1part2"); ]
/ onscriptend = [if(script.groupid, 2 == 2) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group2part2"); ]

is wrong, you want something like

/ onscriptend = [if(mod(script.groupid, 2) == 1) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group1part2"); ]
/ onscriptend = [if(mod(script.groupid, 2) == 0) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group2part2"); ]

Thank you so much for your quick reply! I made these adjustments, and now the experiment is running without the error, but still not redirecting to the correct URL for group 1. Instead, both groups are being redirected to the group 2 finish page (which is the one listed as the finish page in my inquisit web experiment settings). Any other help you can provide with redirecting the groups correctly would be greatly appreciated!
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
abalbert - 2/8/2021
Dave - 2/8/2021
abalbert - 2/8/2021
Hi Dave/Administrators,
I am new to Inquisit Web and trying to do something similar to the above, but am having difficulty adjusting the script to my needs.
I have an experiment with two groups. They start off at different Qualtrics surveys, and then are sent to Inquisit from there, with participant ID and group ID (either group 1 or group 2) carried forward in the URL. Each group will complete the corsi block task, but only group 1 will complete the digit symbol task. When each group finishes their Inquisit tasks, I want them to be redirected again to two different Qualtrics URLs based on their original group membership (group 1 goes to one URL, group 2 goes to another). I've got all the other parts working, but cannot seem to make this redirection to different URLs after completion of the Inquisit tasks work, after several attempts at adjusting the code in different ways. Would you be able to help me with this?
Here is my code right now (with fake URLs). Currently it is giving me an error message that says "'script.groupid, 2' The expression contains an unknown property"

// session 1 groups 1 & 2
<batch>
/ file = "corsiblocktappingtask.iqx"
/ file = "group1_vs_group2.iqx"
/ sessions = (1 of 1)
/ onscriptend = [if(script.groupid, 2 == 1) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group1part2"); ]
/ onscriptend = [if(script.groupid, 2 == 2) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group2part2"); ]
</batch>

See contents of the file "group1_vs_group2.iqx" also below. Maybe there is a way to add the different finish page URL to this script, as it's already describing a modification based on group ID?

<include>
/ precondition = [
    mod(script.groupid, 2) == 1;
]
/ file = "digitsymbolsubstitutiontask_test1.iqx"
</include>



/ onscriptend = [if(script.groupid, 2 == 1) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group1part2"); ]
/ onscriptend = [if(script.groupid, 2 == 2) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group2part2"); ]

is wrong, you want something like

/ onscriptend = [if(mod(script.groupid, 2) == 1) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group1part2"); ]
/ onscriptend = [if(mod(script.groupid, 2) == 0) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group2part2"); ]

Thank you so much for your quick reply! I made these adjustments, and now the experiment is running without the error, but still not redirecting to the correct URL for group 1. Instead, both groups are being redirected to the group 2 finish page (which is the one listed as the finish page in my inquisit web experiment settings). Any other help you can provide with redirecting the groups correctly would be greatly appreciated!

For anything further you will need to provide the link to the online study.
abalbert
abalbert
Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)Associate Member (80 reputation)
Group: Forum Members
Posts: 6, Visits: 22
Dave - 2/8/2021
abalbert - 2/8/2021
Dave - 2/8/2021
abalbert - 2/8/2021
Hi Dave/Administrators,
I am new to Inquisit Web and trying to do something similar to the above, but am having difficulty adjusting the script to my needs.
I have an experiment with two groups. They start off at different Qualtrics surveys, and then are sent to Inquisit from there, with participant ID and group ID (either group 1 or group 2) carried forward in the URL. Each group will complete the corsi block task, but only group 1 will complete the digit symbol task. When each group finishes their Inquisit tasks, I want them to be redirected again to two different Qualtrics URLs based on their original group membership (group 1 goes to one URL, group 2 goes to another). I've got all the other parts working, but cannot seem to make this redirection to different URLs after completion of the Inquisit tasks work, after several attempts at adjusting the code in different ways. Would you be able to help me with this?
Here is my code right now (with fake URLs). Currently it is giving me an error message that says "'script.groupid, 2' The expression contains an unknown property"

// session 1 groups 1 & 2
<batch>
/ file = "corsiblocktappingtask.iqx"
/ file = "group1_vs_group2.iqx"
/ sessions = (1 of 1)
/ onscriptend = [if(script.groupid, 2 == 1) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group1part2"); ]
/ onscriptend = [if(script.groupid, 2 == 2) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group2part2"); ]
</batch>

See contents of the file "group1_vs_group2.iqx" also below. Maybe there is a way to add the different finish page URL to this script, as it's already describing a modification based on group ID?

<include>
/ precondition = [
    mod(script.groupid, 2) == 1;
]
/ file = "digitsymbolsubstitutiontask_test1.iqx"
</include>



/ onscriptend = [if(script.groupid, 2 == 1) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group1part2"); ]
/ onscriptend = [if(script.groupid, 2 == 2) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group2part2"); ]

is wrong, you want something like

/ onscriptend = [if(mod(script.groupid, 2) == 1) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group1part2"); ]
/ onscriptend = [if(mod(script.groupid, 2) == 0) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group2part2"); ]

Thank you so much for your quick reply! I made these adjustments, and now the experiment is running without the error, but still not redirecting to the correct URL for group 1. Instead, both groups are being redirected to the group 2 finish page (which is the one listed as the finish page in my inquisit web experiment settings). Any other help you can provide with redirecting the groups correctly would be greatly appreciated!

For anything further you will need to provide the link to the online study.

Hi Dave, sorry for my ignorance, but what link should I provide to you? the launch page? or is there another link that would allow you access to the actual scripts? My web experiment script name is "GREpredictors" if that helps. Thanks again!
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
abalbert - 2/8/2021
Dave - 2/8/2021
abalbert - 2/8/2021
Dave - 2/8/2021
abalbert - 2/8/2021
Hi Dave/Administrators,
I am new to Inquisit Web and trying to do something similar to the above, but am having difficulty adjusting the script to my needs.
I have an experiment with two groups. They start off at different Qualtrics surveys, and then are sent to Inquisit from there, with participant ID and group ID (either group 1 or group 2) carried forward in the URL. Each group will complete the corsi block task, but only group 1 will complete the digit symbol task. When each group finishes their Inquisit tasks, I want them to be redirected again to two different Qualtrics URLs based on their original group membership (group 1 goes to one URL, group 2 goes to another). I've got all the other parts working, but cannot seem to make this redirection to different URLs after completion of the Inquisit tasks work, after several attempts at adjusting the code in different ways. Would you be able to help me with this?
Here is my code right now (with fake URLs). Currently it is giving me an error message that says "'script.groupid, 2' The expression contains an unknown property"

// session 1 groups 1 & 2
<batch>
/ file = "corsiblocktappingtask.iqx"
/ file = "group1_vs_group2.iqx"
/ sessions = (1 of 1)
/ onscriptend = [if(script.groupid, 2 == 1) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group1part2"); ]
/ onscriptend = [if(script.groupid, 2 == 2) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group2part2"); ]
</batch>

See contents of the file "group1_vs_group2.iqx" also below. Maybe there is a way to add the different finish page URL to this script, as it's already describing a modification based on group ID?

<include>
/ precondition = [
    mod(script.groupid, 2) == 1;
]
/ file = "digitsymbolsubstitutiontask_test1.iqx"
</include>



/ onscriptend = [if(script.groupid, 2 == 1) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group1part2"); ]
/ onscriptend = [if(script.groupid, 2 == 2) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group2part2"); ]

is wrong, you want something like

/ onscriptend = [if(mod(script.groupid, 2) == 1) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group1part2"); ]
/ onscriptend = [if(mod(script.groupid, 2) == 0) defaults.finishpage = concat("https://syracuseuniversity.qualtrics.com/group2part2"); ]

Thank you so much for your quick reply! I made these adjustments, and now the experiment is running without the error, but still not redirecting to the correct URL for group 1. Instead, both groups are being redirected to the group 2 finish page (which is the one listed as the finish page in my inquisit web experiment settings). Any other help you can provide with redirecting the groups correctly would be greatly appreciated!

For anything further you will need to provide the link to the online study.

Hi Dave, sorry for my ignorance, but what link should I provide to you? the launch page? or is there another link that would allow you access to the actual scripts? My web experiment script name is "GREpredictors" if that helps. Thanks again!

> the launch page?

Yes.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search