Add by count question

Hi, @Steve

I am trying to implement your Looping with Actions in my app, specifically the add by count function. And this question is more about the validation than the actual action itself.

As you can see in my image, I would like the Created_Order to restart from 001 and allow duplicates of Created_Order in the table, IF the Seasons are not the same.

How and where would I put that expression in?

At the moment, my Valid If of Created_Order is;

and(

([_this] >= 1),

([_this] <= 150),

isblank(

filter(

“ProductModel”,

([_this] = [Created_Order])

)

- list([_thisrow])

)

)

And my Invalid value error of Created_Order is;

ifs(

not([_this] >= 1),

“Must be at least 1.”,

not([_this] <= 150),

“Must be at most 150.”,

true,

“Account number already in use.”

)

I would like to know how this is possible as well!

https://community.appsheet.com/t/serial-numbers-if-you-must/19325

1 Like

Thank you for your reply, but I have already read this and does not answer my question…

“Created_Order” App formula:

COUNT( FILTER(ProductModel, [Season] = [_ThisRow].[Season]) ) + 1

2 Likes

Change your "Created_Order" Valid If to:

and(

([_this] >= 1),

([_this] <= 150),

isblank(

filter(

“ProductModel”,

and([_this] = [Created_Order], [Season] = [_thisrow].[Season])**)

)

- list([_thisrow])

)

)

Tried this on in my App formula, but when I go back to edit row, it makes a +1 change.

does this mean I have to put it in the initial value?

1 Like

BTW, that diagram looks great. Where did you make it?

1 Like

Whimsical!

1 Like

Thanks, looks interesting

Whimsical - Where Great Ideas Take Shape

1 Like

Yes, you are right. Initial value to avoid recalculation.

2 Likes

Thank you very much!

1 Like

Thanks for sharing the diagram info!!