question

Anggoro P avatar image
0 Likes"
Anggoro P asked Matthew Gillespie commented

Schedule source: rowNumber

Hi, I think it is a stupid question, but I just want to make sure this.

I use schedule source for defining customer demand. On the table I use 0, 1, 2, etc in the "time" field, indicating when corresponding demand qty are generated. Then I assign new label called "TreatDay" to get the day of demand (in integer, e.g. 1: sun; 2: mon; etc). By using "values by case" and case function "rowNumber" I set the case and desired day number (as attached)

I wonder should I use case = 0 for appointing the first row in my table because I set time = 0 in the first row? Or should I use case = 1

Choose One
schedule sourcevalues by case
a.jpg (84.3 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Matthew Gillespie avatar image
2 Likes"
Matthew Gillespie answered Matthew Gillespie commented

The rowNumber tells you what row in the table the token is associated with. All tokens created from the first row in the table will have a rowNumber of 1.

This arrival table will give you the following tokens and rowNumbers:

Token ID rowNumber
1 1
2 1
3 1
4 2
5 2
6 3
7 4
8 4

table.png (1.8 KiB)
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Anggoro P avatar image Anggoro P commented ·

@Matthew Gillespie

So, it depends on the quantity created in each row, isn't it?

Then, a further question would be, how we can use "case function" in the "values by case" such that we refer to all quantities generated per row. I want to set a label for all quantities per row with the same value

Also, I have tried this way. Setting the case function = rowNumber and case value for the first row = 1, the second row = 2, etc I got this result:

I checked the name of token and corresponding treatday and it seems working

For RU_Tue: treatday = 3, for RU_Wed: treatday = 4, etc

0 Likes 0 ·
b.jpg (42.3 KiB)
capture.jpg (37.4 KiB)
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Anggoro P commented ·

No, it doesn't depend on the quantity created. Every token created from Row1 will have a rowNumber of 1. That's why in my example Tokens 1-3 have a rowNumber of 1 since Row1 creates 3 tokens. Row2 creates 2 tokens so Tokens 4-5 have a rowNumber of 2, etc.

It looks like you are using the rowNumber correctly in the Values By Case popup though. Tokens from Row1 will get a 5, from Row6 will get a 3, and from Row7 will get a 4.

You can also add label columns directly to the table. Then you don't even need to worry about referencing the rowNumber:

0 Likes 0 ·
labels.png (6.1 KiB)

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.