Printer API - list of items

Hi Guys,
I’ve got an interesting question.
I’ve set up an API with my apps that allow me to print off orders from a restaurant.
Everything seems to be working which is great.

But I reached an impasse with sending a list of items.

This is what it looks like when printed:

I’m able to add all the required info.
But what If I want to list the item names? How could I go about this?

For reference I have this list:


which has a relationship with Order Items.

but when I’m picking with the smart text it only allows me to count the items and not actually get their names.

Any known workarounds?

@Ben any chance you could help with this?

Bump.

Anyone has any ideas?

Could you post some screenshots of the setup of order items collection? Also a screenshot showing how a record in the Order’s collection looks.

Hi Colin, Thanks for the answer.

Here is the order item collection:

And this is a complete order in my system.



image

Hi @designedhead

I might be wrong but I think this is the sort of question like “how extract a list of items into some single entity like plaintext”… which is usually done by using a loopы in “classic” development, but loops are not available in Adalo yet.

As an idea:
The workaround I might suggest involves using countdown timer - displaying a list of order items, with countdown timer on each, and adding an API action to send the data of this order item to the printer.
The main difficulty here would be that you should not send all the items at once (I guess printer will go crazy), but one-by-one. So you’ll need to have some kind of way to put 1…2…3…X seconds to each OrderItem Countdown timer entry in a list, so that they execute sequentially.
This could be done by introducing orderItem IDs, probably.

Just my 2 cents, may be I’m overcomplicating it.

Would be interested to hear what @Colin thinks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.