• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Output Individual web app item without itemId number

New Here ,
Mar 26, 2017 Mar 26, 2017

Copy link to clipboard

Copied

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?

TOPICS
Web apps

Views

428

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 28, 2017 Mar 28, 2017

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.

Votes

Translate

Translate
Explorer ,
Mar 28, 2017 Mar 28, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 28, 2017 Mar 28, 2017

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 28, 2017 Mar 28, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 28, 2017 Mar 28, 2017

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 28, 2017 Mar 28, 2017

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 28, 2017 Mar 28, 2017

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines