In the moment I'm developing a flow which checks periodically amazon's prices of some products. I store these prices in a map variable with some additional information.
global_amazon={www.amazon.de/product 1[name1, price1, merchant1], www.amazon.de/product2=[name2, price2, merchant2]}
Moreover, I have got an overlay which shows me the actual price. The widget extracts the prices of all products and store them in a local list. (list=[14,36, 25,68]). That's no problem. But now I am not able to show the prices with a added euro symbol at the end in multiple lines. So my widget should like:
price1€
price2€
price3€
I tried to paste a enter space so that the prices are in different lines but it causes an error. Additionally, all prices should be shown centrally. Is there a way to solve this?
Enter space in a widget
Moderator: Martin
Re: Enter space in a widget
Hi,
You could use a script to concatenate the prices in a loop:
The widget element has to be set to Multiline and Textalign to Center.
Regards,
Martin
You could use a script to concatenate the prices in a loop:
Code: Select all
list = newList(14, 36, 25, 68);
res = "";
for (p in list)
{
res = res + p + "€\n";
}
setWidgetElementProperty("Widget1", "Text_1", "text", res);
Regards,
Martin
Re: Enter space in a widget
Thanks a lot, Martin!