<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Possible to remove a choice from a reference variable if it is already selected in a Multirow Variable set? in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/possible-to-remove-a-choice-from-a-reference-variable-if-it-is/m-p/1363569#M20495</link>
    <description>&lt;P&gt;I've got a Multirow variable set that is set up to return users only associated to a common cost center - that part works great.&lt;/P&gt;
&lt;P&gt;What I am wondering is if there is something out there that can remove a choice from that reference list once that user has been selected. Currently I can select the user, fill out the mandatory fields and Add them to the MRVS. Then when I click "Add" again, that same user is still there and available for selection. Once they are selected I'd like to remove them.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has anyone ever done this or know how?&lt;/P&gt;
&lt;P&gt;Here is an example of what I am talking about - I have already selected myself and added my record to the MRVS, but when I click Add again, I am still there available for selection.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/146604iD017A45BAF6E3265/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Mar 2022 22:31:06 GMT</pubDate>
    <dc:creator>Kris V</dc:creator>
    <dc:date>2022-03-23T22:31:06Z</dc:date>
    <item>
      <title>Possible to remove a choice from a reference variable if it is already selected in a Multirow Variable set?</title>
      <link>https://www.servicenow.com/community/developer-forum/possible-to-remove-a-choice-from-a-reference-variable-if-it-is/m-p/1363569#M20495</link>
      <description>&lt;P&gt;I've got a Multirow variable set that is set up to return users only associated to a common cost center - that part works great.&lt;/P&gt;
&lt;P&gt;What I am wondering is if there is something out there that can remove a choice from that reference list once that user has been selected. Currently I can select the user, fill out the mandatory fields and Add them to the MRVS. Then when I click "Add" again, that same user is still there and available for selection. Once they are selected I'd like to remove them.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has anyone ever done this or know how?&lt;/P&gt;
&lt;P&gt;Here is an example of what I am talking about - I have already selected myself and added my record to the MRVS, but when I click Add again, I am still there available for selection.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/146604iD017A45BAF6E3265/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 22:31:06 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/possible-to-remove-a-choice-from-a-reference-variable-if-it-is/m-p/1363569#M20495</guid>
      <dc:creator>Kris V</dc:creator>
      <dc:date>2022-03-23T22:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to remove a choice from a reference variable if it is already selected in a Multirow Variable set?</title>
      <link>https://www.servicenow.com/community/developer-forum/possible-to-remove-a-choice-from-a-reference-variable-if-it-is/m-p/1363570#M20496</link>
      <description>&lt;P&gt;You should be able to utilize an advanced reference qualifier to update the choices available within the list field based on prior input from the user.&lt;/P&gt;
&lt;P&gt;Take a look at a similar example here: https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=8fd60853db946410fb115583ca961971&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 00:19:20 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/possible-to-remove-a-choice-from-a-reference-variable-if-it-is/m-p/1363570#M20496</guid>
      <dc:creator>PB20201617</dc:creator>
      <dc:date>2022-03-24T00:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to remove a choice from a reference variable if it is already selected in a Multirow Variable set?</title>
      <link>https://www.servicenow.com/community/developer-forum/possible-to-remove-a-choice-from-a-reference-variable-if-it-is/m-p/1363571#M20497</link>
      <description>&lt;P&gt;So you could potentially do this, with quite a bit of difficulty and probably some undesired side-effects.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only method I could think of would require you to write the selected users back to your catalog item with each row submit, and on each row load pull in that list to a hidden field on the MRVS (hidden on the modal but not on the row list) and then write a complicate reference qualifier to take the value of the field, and modify your query with a bunch of "^sys_id!=" statements to exclude the already selected users.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would have to use some &lt;A href="https://community.servicenow.com/community?id=community_article&amp;amp;sys_id=4b54ab561bfa445cada243f6fe4bcbeb" target="_blank"&gt;unorthodox methods&lt;/A&gt; to be able to write values from within the MRVS to the form and then load them back with each row, and you would have to do this as you can only reference fields on the MRVS form itself as part of a reference qualifier.&lt;/P&gt;
&lt;P&gt;As an alternative you might consider using the "unique" checkbox on the variable itself. That would prevent the user from adding multiple rows with that same value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps!&lt;/P&gt;
&lt;P&gt;If this was helpful, or correct, please be kind and mark the answer appropriately.&lt;/P&gt;
&lt;P&gt;Michael Jones - Proud member of the GlideFast Consulting Team!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 00:20:20 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/possible-to-remove-a-choice-from-a-reference-variable-if-it-is/m-p/1363571#M20497</guid>
      <dc:creator>Michael Jones -</dc:creator>
      <dc:date>2022-03-24T00:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to remove a choice from a reference variable if it is already selected in a Multirow Variable set?</title>
      <link>https://www.servicenow.com/community/developer-forum/possible-to-remove-a-choice-from-a-reference-variable-if-it-is/m-p/1363572#M20498</link>
      <description>&lt;P&gt;Hi &lt;SN-MENTION class="sn-mention" table="live_profile" sysid="a43e8665dbd41fc09c9ffb651f961945"&gt;@Kris V&lt;/SN-MENTION&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OOB we had an option but it will show the user to select but it won't accept to add .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Solution :&lt;/P&gt;
&lt;P&gt;you can find this(&lt;STRONG&gt;Unique , Unique Values Only&lt;/STRONG&gt;)2 fields for each variable. On username field you can make this 2 fields as true then it won't allow duplicate entry.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Naveen&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 07:30:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/possible-to-remove-a-choice-from-a-reference-variable-if-it-is/m-p/1363572#M20498</guid>
      <dc:creator>naveen14</dc:creator>
      <dc:date>2022-03-24T07:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to remove a choice from a reference variable if it is already selected in a Multirow Variable set?</title>
      <link>https://www.servicenow.com/community/developer-forum/possible-to-remove-a-choice-from-a-reference-variable-if-it-is/m-p/1363573#M20499</link>
      <description>&lt;P&gt;&lt;SN-MENTION class="sn-mention" table="live_profile" sysid="a43e8665dbd41fc09c9ffb651f961945"&gt;@Kris V&lt;/SN-MENTION&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can check the Unique Checkbox on JMP User Name&lt;/P&gt;
&lt;P&gt;So that you cannot select the same user again but the user is still visible on the list but you cant add the row.&lt;/P&gt;
&lt;P&gt;Same explained in my article. Refer this:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.servicenow.com/community?id=community_article&amp;amp;sys_id=a0dcbf0fdbbc8150e515c22305961941" target="_blank"&gt;https://community.servicenow.com/community?id=community_article&amp;amp;sys_id=a0dcbf0fdbbc8150e515c22305961941&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Murthy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 07:49:18 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/possible-to-remove-a-choice-from-a-reference-variable-if-it-is/m-p/1363573#M20499</guid>
      <dc:creator>Murthy Ch</dc:creator>
      <dc:date>2022-03-24T07:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to remove a choice from a reference variable if it is already selected in a Multirow Variable set?</title>
      <link>https://www.servicenow.com/community/developer-forum/possible-to-remove-a-choice-from-a-reference-variable-if-it-is/m-p/1363574#M20500</link>
      <description>&lt;P&gt;Thanks for the reply - I am already using the unorthodox method to push cost center in to the MRVS which is what the advanced ref qualifier on the user name field is filtered off of.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will try the unique checkbox, although I thought when I looked yesterday there wasn't an option for that on the variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Just checked and it wasn't on the form, I will add it and give that a shot)&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 14:05:00 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/possible-to-remove-a-choice-from-a-reference-variable-if-it-is/m-p/1363574#M20500</guid>
      <dc:creator>Kris V</dc:creator>
      <dc:date>2022-03-24T14:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to remove a choice from a reference variable if it is already selected in a Multirow Variable set?</title>
      <link>https://www.servicenow.com/community/developer-forum/possible-to-remove-a-choice-from-a-reference-variable-if-it-is/m-p/1363575#M20501</link>
      <description>&lt;P&gt;That works for limiting it, which is good enough! Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 14:06:56 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/possible-to-remove-a-choice-from-a-reference-variable-if-it-is/m-p/1363575#M20501</guid>
      <dc:creator>Kris V</dc:creator>
      <dc:date>2022-03-24T14:06:56Z</dc:date>
    </item>
  </channel>
</rss>

