<?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 Re: Create a New Button and Add it to a Container Using C... in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/create-a-new-button-and-add-it-to-a-container-using-custom-javascript-in/qaa-p/13638871#M4821899</link>
    <description>Hi Ron, in development we also have such cases, usually we to not create a button depending on what kind of data is returned or what kind of situation we are. We have the button always there but we hide it or show it depending on that.</description>
    <pubDate>Thu, 14 Mar 2024 19:56:09 GMT</pubDate>
    <dc:creator>Edrilan_Berisha</dc:creator>
    <dc:date>2024-03-14T19:56:09Z</dc:date>
    <item>
      <title>Create a New Button and Add it to a Container Using Custom JavaScript in SAP Build Apps</title>
      <link>https://community.sap.com/t5/technology-q-a/create-a-new-button-and-add-it-to-a-container-using-custom-javascript-in/qaq-p/13638535</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a container that I want to dynamically add a button to using custom JavaScript when I click a button that already exists in the form.&lt;/P&gt;&lt;P&gt;This is the code I've tried and i know that the Component ID of the container is correct but the button isn't showing up.&amp;nbsp; I'm guessing that maybe I'm not creating the button correctly?&amp;nbsp; Also, I haven't done anything with the inputs or Outputs.&amp;nbsp; Is that something that I would need to do?&lt;/P&gt;&lt;P&gt;const container = document.getElementById("9f1b57c7-72a2-4d17-9c20-91ab6dbecc4c");&lt;BR /&gt;const newButton = document.createElement("button");&lt;BR /&gt;newButton.textContent = "Click Here";&lt;BR /&gt;container.appendChild(newButton);&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Ron&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 15:22:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/create-a-new-button-and-add-it-to-a-container-using-custom-javascript-in/qaq-p/13638535</guid>
      <dc:creator>Ron_Hagan</dc:creator>
      <dc:date>2024-03-14T15:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create a New Button and Add it to a Container Using C...</title>
      <link>https://community.sap.com/t5/technology-q-a/create-a-new-button-and-add-it-to-a-container-using-custom-javascript-in/qaa-p/13638544#M4821876</link>
      <description>&lt;P&gt;Hi Ron,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;why don't you just add the button via the SAP Build tool itself using drag and drop?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P class=""&gt;Edrilan Berisha&lt;/P&gt;&lt;P class=""&gt;SAP S/4HANA Cloud Financials Development&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 15:29:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/create-a-new-button-and-add-it-to-a-container-using-custom-javascript-in/qaa-p/13638544#M4821876</guid>
      <dc:creator>Edrilan_Berisha</dc:creator>
      <dc:date>2024-03-14T15:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: Create a New Button and Add it to a Container Using C...</title>
      <link>https://community.sap.com/t5/technology-q-a/create-a-new-button-and-add-it-to-a-container-using-custom-javascript-in/qaa-p/13638864#M4821898</link>
      <description>Hi Edrilan. I will be bringing in data and depending on what is returned, I may have to add one or more buttons (or text components).</description>
      <pubDate>Thu, 14 Mar 2024 19:41:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/create-a-new-button-and-add-it-to-a-container-using-custom-javascript-in/qaa-p/13638864#M4821898</guid>
      <dc:creator>Ron_Hagan</dc:creator>
      <dc:date>2024-03-14T19:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create a New Button and Add it to a Container Using C...</title>
      <link>https://community.sap.com/t5/technology-q-a/create-a-new-button-and-add-it-to-a-container-using-custom-javascript-in/qaa-p/13638871#M4821899</link>
      <description>Hi Ron, in development we also have such cases, usually we to not create a button depending on what kind of data is returned or what kind of situation we are. We have the button always there but we hide it or show it depending on that.</description>
      <pubDate>Thu, 14 Mar 2024 19:56:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/create-a-new-button-and-add-it-to-a-container-using-custom-javascript-in/qaa-p/13638871#M4821899</guid>
      <dc:creator>Edrilan_Berisha</dc:creator>
      <dc:date>2024-03-14T19:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Create a New Button and Add it to a Container Using C...</title>
      <link>https://community.sap.com/t5/technology-q-a/create-a-new-button-and-add-it-to-a-container-using-custom-javascript-in/qaa-p/13638872#M4821900</link>
      <description>&lt;P&gt;I think you could do the same:&lt;/P&gt;&lt;P&gt;1. Install a "Hide component" flow function from the Marketplace.&lt;/P&gt;&lt;P&gt;2. Attach it to the button's "Component tap" event. (I guess you press another button earlier which will fetch some data?)&lt;/P&gt;&lt;P&gt;3. Choose the desired button in the flow function properties.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 19:57:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/create-a-new-button-and-add-it-to-a-container-using-custom-javascript-in/qaa-p/13638872#M4821900</guid>
      <dc:creator>Edrilan_Berisha</dc:creator>
      <dc:date>2024-03-14T19:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create a New Button and Add it to a Container Using C...</title>
      <link>https://community.sap.com/t5/technology-q-a/create-a-new-button-and-add-it-to-a-container-using-custom-javascript-in/qaa-p/13638879#M4821901</link>
      <description>That makes sense, Edrilan! I'm going to try that. Thank you!</description>
      <pubDate>Thu, 14 Mar 2024 20:15:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/create-a-new-button-and-add-it-to-a-container-using-custom-javascript-in/qaa-p/13638879#M4821901</guid>
      <dc:creator>Ron_Hagan</dc:creator>
      <dc:date>2024-03-14T20:15:39Z</dc:date>
    </item>
  </channel>
</rss>

