<?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 Adding buttons to a list item in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/adding-buttons-to-a-list-item/m-p/2793306#M1072887</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a requirement where i need to add an approve and a reject button at the end of a row in the list item. Is there a way to achieve this? I am currently using the list-simple component and am not sure how to add buttons at the end of the row. Any inputs on this will be helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Sanjay&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jan 2024 09:04:41 GMT</pubDate>
    <dc:creator>sanjay_navada</dc:creator>
    <dc:date>2024-01-16T09:04:41Z</dc:date>
    <item>
      <title>Adding buttons to a list item</title>
      <link>https://www.servicenow.com/community/developer-forum/adding-buttons-to-a-list-item/m-p/2793306#M1072887</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a requirement where i need to add an approve and a reject button at the end of a row in the list item. Is there a way to achieve this? I am currently using the list-simple component and am not sure how to add buttons at the end of the row. Any inputs on this will be helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Sanjay&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 09:04:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/adding-buttons-to-a-list-item/m-p/2793306#M1072887</guid>
      <dc:creator>sanjay_navada</dc:creator>
      <dc:date>2024-01-16T09:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: Adding buttons to a list item</title>
      <link>https://www.servicenow.com/community/developer-forum/adding-buttons-to-a-list-item/m-p/2793318#M1072891</link>
      <description>&lt;P&gt;&lt;BR /&gt;Yes, you can achieve this by creating a UI Action in ServiceNow. Here are the steps:&lt;/P&gt;&lt;P&gt;1. Navigate to System UI &amp;gt; UI Actions.&lt;BR /&gt;2. Click on New to create a new UI Action.&lt;BR /&gt;3. Fill in the necessary fields:&lt;BR /&gt;- Name: Give a name to your UI Action.&lt;BR /&gt;- Table: Select the table where you want to add the buttons.&lt;BR /&gt;- Action name: This is automatically populated based on the name.&lt;BR /&gt;- List choice: Select this if you want the UI Action to appear in the list choice.&lt;BR /&gt;- Form button: Select this if you want the UI Action to appear on the form.&lt;BR /&gt;- List banner button: Select this if you want the UI Action to appear on the list banner.&lt;BR /&gt;- List context menu: Select this if you want the UI Action to appear in the list context menu.&lt;BR /&gt;- Form context menu: Select this if you want the UI Action to appear in the form context menu.&lt;BR /&gt;4. In the Script field, add your custom script to perform the approve/reject action.&lt;BR /&gt;5. Click on Submit to save the UI Action.&lt;/P&gt;&lt;P&gt;Here is a sample code for an approve button:&lt;/P&gt;&lt;P&gt;javascript&lt;BR /&gt;if (current.state == 'pending') {&lt;BR /&gt;current.state = 'approved';&lt;BR /&gt;current.update();&lt;BR /&gt;gs.addInfoMessage('Record approved');&lt;BR /&gt;action.setRedirectURL(current);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;And a sample code for a reject button:&lt;/P&gt;&lt;P&gt;javascript&lt;BR /&gt;if (current.state == 'pending') {&lt;BR /&gt;current.state = 'rejected';&lt;BR /&gt;current.update();&lt;BR /&gt;gs.addInfoMessage('Record rejected');&lt;BR /&gt;action.setRedirectURL(current);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Please note that you need to replace 'state', 'approved', and 'rejected' with your actual field and values. Also, make sure that the 'Show insert' and 'Show update' checkboxes are selected for the UI Action to appear on the list.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;nowKB.com&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 09:10:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/adding-buttons-to-a-list-item/m-p/2793318#M1072891</guid>
      <dc:creator>Rajdeep Ganguly</dc:creator>
      <dc:date>2024-01-16T09:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Adding buttons to a list item</title>
      <link>https://www.servicenow.com/community/developer-forum/adding-buttons-to-a-list-item/m-p/2793343#M1072907</link>
      <description>&lt;P&gt;Thanks Rajdeep for the quick response. Rephrasing my question, I am currently building a dashboard in Service Now using UI builder. In the dashboard I have added a List-Simple widget and I have configured the list to display 4 rows and 5 columns. As a 6th and 7th column i want to see an approve and reject button. Am trying to understand Is this possible?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Sanjay&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 09:32:26 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/adding-buttons-to-a-list-item/m-p/2793343#M1072907</guid>
      <dc:creator>sanjay_navada</dc:creator>
      <dc:date>2024-01-16T09:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Adding buttons to a list item</title>
      <link>https://www.servicenow.com/community/developer-forum/adding-buttons-to-a-list-item/m-p/2793362#M1072916</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/647448"&gt;@sanjay_navada&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Greetings!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You want t use these button to approve or reject on Dashboards, if this is case, I doubt we can do this in SN. Please provide some screenshot to understand better.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 09:41:52 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/adding-buttons-to-a-list-item/m-p/2793362#M1072916</guid>
      <dc:creator>Dr Atul G- LNG</dc:creator>
      <dc:date>2024-01-16T09:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Adding buttons to a list item</title>
      <link>https://www.servicenow.com/community/developer-forum/adding-buttons-to-a-list-item/m-p/2793406#M1072927</link>
      <description>&lt;P&gt;Hi Atul,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PFA the snapshot on what am referring to. I have created a dummy table. Next to column 5, i am trying to add an approve and reject button.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For my knowledge, If it is not possible in Dashboard? Can this be achieved in Service portal? Currently am trying this under Experience Portal Dashboard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Sanjay Navada&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 09:57:00 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/adding-buttons-to-a-list-item/m-p/2793406#M1072927</guid>
      <dc:creator>sanjay_navada</dc:creator>
      <dc:date>2024-01-16T09:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Adding buttons to a list item</title>
      <link>https://www.servicenow.com/community/developer-forum/adding-buttons-to-a-list-item/m-p/2793433#M1072938</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/647448"&gt;@sanjay_navada&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dashboards are just to view the data not to take action, so it is not possible on dashboards#&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2nd on portal yes, it is OOTB available on Service Portal like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LearnNGrowAtul_0-1705399600546.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/321419i8D4EF4421D1BE878/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LearnNGrowAtul_0-1705399600546.png" alt="LearnNGrowAtul_0-1705399600546.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 10:06:44 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/adding-buttons-to-a-list-item/m-p/2793433#M1072938</guid>
      <dc:creator>Dr Atul G- LNG</dc:creator>
      <dc:date>2024-01-16T10:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Adding buttons to a list item</title>
      <link>https://www.servicenow.com/community/developer-forum/adding-buttons-to-a-list-item/m-p/2793460#M1072950</link>
      <description>&lt;P&gt;Thanks Atul&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 10:19:54 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/adding-buttons-to-a-list-item/m-p/2793460#M1072950</guid>
      <dc:creator>sanjay_navada</dc:creator>
      <dc:date>2024-01-16T10:19:54Z</dc:date>
    </item>
  </channel>
</rss>

