I wanna use ROW item, but I can’t set data.
Please Help!
I set Row and set Repeat with
“GROUP<product, index, category, products>( data.VsResult1, product.VsDate, { category: category, count: “全”+COUNT(products)})” 新しいビットマップ イメージ.bmp (1.9 MB)
after that , I try to set to CELL’s RepeatWth “current. category” and “current.count” 新しいビットマップ イメージ (2).bmp (1.5 MB)
I try to do it! But it didn’t work!
I’m confused! I don’t understand it!
Please Help!
1.Drag a Container onto the canvas.
⇒Set repeat with “GROUP( data.VsResult1, product.VsDate, { category: category, count: “全”+COUNT(products)})”
2.New Container drag to Container i’m repeating.
⇒Set repeat with “current.category” 新しいビットマップ イメージ (3).bmp (183.1 KB)
then, I saw RedScreen with error console…
I think , I set wrong “repeat with” . But I don’t have any idea without that .
Firstly, did step 1 work? Did Container 1 repeat with “GROUP( data.VsResult1, product.VsDate, { category: category, count: “全”+COUNT(products)})” work correctly? If you put a text inside Container 1 and tie it with formula to ENCODE_JSON(current), does it look like the correct data?
Second problem might be when repeating Container 2, you have to give a name to either Container 1 or Container 2 repeats. I suggest doing this to Container 1 and naming it products instead of current. That way in Container 2, when you use current, it means the repeat of Container 2, not the repeat of Container 1. I hope you understand what I mean!
From the screenshot, it looks like Category is type text, not type List of Objects, like it should be if there are many categories for one product. Also in your data it looks like Category is a text, not anything that can be repeated: the category is a like “2020-09-21:kakitsu” (but in hiragana).
If you only want to show “2020-09-21” and “kakitsu” (in hiragana) under the product separately, that is possible with the current structure (but if you want more information from the category from a different data resource, this will not be enough). The formula for the repeat of Container 2 would be:
MAP(SPLIT(product.category, ":"), {id: item})
With this, you can in Container 2 use current.id, and it will be “2020-09-21” or “kakitsu” (in hiragana). Not sure if this is what you want, but maybe this can help you forward?
Hmm… If you draw me an example of how the table would look, I can try to think if there is another way to implement this. But if you are ok with what you have now, that’s fine too