﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 6  » Formatting subject ID</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Wed, 16 Sep 2026 02:28:05 GMT</lastBuildDate><ttl>20</ttl><item><title>Formatting subject ID</title><link>https://forums.millisecond.com/Topic30425.aspx</link><description>I am interested in having a values.marker variable which will contain some digits as the subject ID. I need this variable's 3rd, 4th and 5th digit to indicate the subject ID. So if the subjectID is 123 values.marker should be 11123 and if subjectID is 45 values.marker should be 11045. When I use the following code using format function, I get some set of random numbers in my marker and the not the appropriate subject id. If I use another variable in the script that I had defined like values.faceDuration the formatting this way works. I am not sure why it does not work for script.subjectid and how may I resolve this?&lt;br/&gt;&lt;br/&gt;values.marker = 11;&lt;br/&gt;values.marker = concat(values.marker, format("%03d", script.subjectid));</description><pubDate>Wed, 23 Dec 2020 18:32:15 GMT</pubDate><dc:creator>nidhi_desai</dc:creator></item><item><title>RE: Formatting subject ID</title><link>https://forums.millisecond.com/Topic30427.aspx</link><description>&lt;blockquote data-id="30426" class="if-quote-wrapper" unselectable="on" data-guid="1608748317054" contenteditable="false" id="if_insertedNode_1608748315969"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="30426" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="30426" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="30426" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - 12/23/2020&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-30426"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="30425" class="if-quote-wrapper" unselectable="on" data-guid="1608748317054" id="if_insertedNode_1608746579544" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="30425" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="30425" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="30425" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;nidhi_desai - 12/23/2020&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-30425"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;I am interested in having a values.marker variable which will contain some digits as the subject ID. I need this variable's 3rd, 4th and 5th digit to indicate the subject ID. So if the subjectID is 123 values.marker should be 11123 and if subjectID is 45 values.marker should be 11045. When I use the following code using format function, I get some set of random numbers in my marker and the not the appropriate subject id. If I use another variable in the script that I had defined like values.faceDuration the formatting this way works. I am not sure why it does not work for script.subjectid and how may I resolve this?&lt;br/&gt;&lt;br/&gt;values.marker = 11;&lt;br/&gt;values.marker = concat(values.marker, format("%03d", script.subjectid));&lt;a class="if-quote-goto quote-link" href="#" data-id="30425"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ marker = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.marker = 11;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.marker = concat(values.marker, format("%03d", &lt;strong&gt;evaluate(script.subjectid)&lt;/strong&gt;)); &lt;br/&gt;]&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%values.marker%&amp;gt;")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;You need to make sure the ID is not treated as a string, but as an integer.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="30426"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;Great, that solved the problem. Thank you.</description><pubDate>Wed, 23 Dec 2020 18:32:15 GMT</pubDate><dc:creator>nidhi_desai</dc:creator></item><item><title>RE: Formatting subject ID</title><link>https://forums.millisecond.com/Topic30426.aspx</link><description>&lt;blockquote data-id="30425" class="if-quote-wrapper" unselectable="on" data-guid="1608746580719" id="if_insertedNode_1608746579544" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="30425" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="30425" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="30425" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;nidhi_desai - 12/23/2020&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-30425"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;I am interested in having a values.marker variable which will contain some digits as the subject ID. I need this variable's 3rd, 4th and 5th digit to indicate the subject ID. So if the subjectID is 123 values.marker should be 11123 and if subjectID is 45 values.marker should be 11045. When I use the following code using format function, I get some set of random numbers in my marker and the not the appropriate subject id. If I use another variable in the script that I had defined like values.faceDuration the formatting this way works. I am not sure why it does not work for script.subjectid and how may I resolve this?&lt;br/&gt;&lt;br/&gt;values.marker = 11;&lt;br/&gt;values.marker = concat(values.marker, format("%03d", script.subjectid));&lt;a class="if-quote-goto quote-link" href="#" data-id="30425"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ marker = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.marker = 11;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.marker = concat(values.marker, format("%03d", &lt;strong&gt;evaluate(script.subjectid)&lt;/strong&gt;)); &lt;br/&gt;]&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%values.marker%&amp;gt;")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;You need to make sure the ID is not treated as a string, but as an integer.&lt;br/&gt;</description><pubDate>Wed, 23 Dec 2020 18:06:30 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>