6 Replies Latest reply on Mar 28, 2017 11:54 PM by Peter · Genie Corp.

    Output Individual web app item without itemId number

    DriverGroup

      Here's how to output an individual webapp item:

      {module_webapps id="WebAppName" filter="item" itemId="1234567"}

       

      for the id=""

      One can either use the id number of the webapp or the name of the webapp

      In the example above i have used the name of the webapp.

       

      I'd like to do the same for the itemid=""

      In the above example I've shown the webapp item number.

      However I want to set the item to output by its item name (using its 'Item Name' field).

       

      Is this possible?

        • 1. Re: Output Individual web app item without itemId number
          Peter · Genie Corp. Level 1

          Can you please explain why you need to do this? How come you can't use the itemId?

          If it was possible to use the Item name as the output, you would still achieve the same output?

           

          Is it because you want to output more than one item?
          When you use the itemId it is because you only want to get one output and I would imagine that is why

          it has to be a unique value (id number).

           

          But please share what you want your "end-result" to be and maybe it can be achieved in another way

          • 2. Re: Output Individual web app item without itemId number
            Liam Dilley Adobe Community Professional & MVP

            He is asking if itemid can run the name convention the same as the id param does, very simple question - Outputting one item only as he stated.

             

            At this stage Reagan you can not use a name convention for itemId.

            • 3. Re: Output Individual web app item without itemId number
              DriverGroup Level 1

              Thanks Liam,

              This leads me to ask a couple of further questions:

               

              Q1)

              When using the API to make/update a WebApp and its items (from software external to BC) can you specify what the unique ItemID of each webapp item is to be, or does BC automatically assign this number?

               

              Q2)

              If BC does automatically assign the ItemID to WebApp items (when using the API) - and I'm using external software to repeatedly update a WebApp's items via the API - will the item ID for each particular WebApp item continually change or can it be made to stay the same.

               

              Basically - I want to update the custom fields of webapp items while maintaining each items existing itemID.

               

              eg.

              Les say I have a price outputting on a page like so:

              {module_webapps id="WebAppName" filter="item" itemId="1234567" template="price.tpl"}

                  (where the price.tpl outputs a custom field of the webapp called Price)

               

              Now if I was to use the API to update all the price fields of items in the WebApp called 'WebAppName'

              Can I do so while maintaining the same item itemId's

              If an update by API was to change the itemID number all my prices would not ouput correctly on the page as the itemID would change on me.

               

                  {module_webapps id="WebAppName" filter="item" itemId="1234567" template="price.tpl"}

               

              Thanks,

              Reagan

              • 4. Re: Output Individual web app item without itemId number
                Liam Dilley Adobe Community Professional & MVP

                1. Since the webapp API is only intended for Open Platform Apps you can not officially use this outside of that environment. If you have found a way to do so this would be considered a loophole and potential security issue by BC and may be changed/blocked at any time.

                But in terms of the API, BC generates its ID values here.

                 

                2. You need an ID to update an item using BC API, this does not change unless the item is deleted and re-created.

                • 5. Re: Output Individual web app item without itemId number
                  DriverGroup Level 1

                  At the moment I can export a CSV of a WebApp's data, edit it, then import it back into BC.

                  Q3) Are you suggesting in your answer to Q1 that there is no method that will allow us to perform similar population functionality as  'CSV import' programatically from an external source?

                   

                  Q4) I believe it is possible to populate eCommerce externally via an API, why not WebApps?

                  • 6. Re: Output Individual web app item without itemId number
                    Peter · Genie Corp. Level 1

                    Liam - I get what he wanted to do, I just wanted to know what he wanted to achieve, because I then thought it would be a bit easier to help.