Auto Number
Hi,
I have a list of numbers, they are used for unique product codes.
As you can see the last number we used was 201028.
When a user enters a product in another module, it looks up the BVFSKUID from this list using the BVFSKU column, If there is no matching record, we need to create a new line in this list, with the BVFSKU Description they have, and a new BVFSKUID using the next number (201029) automatically.
How do i find the next (maximum) number in this list, so i can increase by 1 and use????
thanks
Best Answers
-
1 Create a module (if not already) by the list
2. Add two line items
- Code = CODE(ITEM(listname))
- Code Value = VALUE(Code)
3. Set the summary option for Code Value to MAX
4. you can then refer to this in your creation module
I hope that helps
David
1 -
In any module that doesn't contain the numbered list, you can just point the line item to the number code and it will return the MAX value
Get well soon!!
@kavinkumar We should avoid using TEXTLIST whenever possible due to the memory overhead
- Planual rule 2.02-11
In this case the Top level item will be much more efficient than TEXTLIST
David
1
Answers
-
Hi David,
Hi, I had tried that but i now have a module with a number...
I still don't know how i can reference it?
What am i missing, something simple no doubt
0 -
Look at the bottom (Top level item) and if the summary method is set to Max, you will see the last/maximum number created
David
0 -
How do i look at the bottom (top level item)?
0 -
Scroll down?!
If you can't see it, have you got a filter or "select levels" turned on
As it's a top level, you can point another line item that is not dimensioned by the list and it will return the value.
You may want to hold this in a separate module; but it will depend on the logic for you building the numbered list
David
0 -
That is the bottom.
I have no filters on.
No levels selected, it is pure brand new module.
The summary is set to MAX
0 -
In the configure tab for the list, set a top level item, then you will have the MAX at the bottom
David
0 -
Aha, i have a maximum now..
Sorry, i am quite poorly and brain is on 25%....
How do i now refer to that in my creation module?
thanks for this, its so simple but so is breathing usually 🙂
Much thanks again, it really is appreciated
0 -
HI @DeveloperCYT,
Try this, You don't need to set up any top level items.
Create a module with this list as dimension and create line items and put the formula as per SS.
Now you can refer the 'Max' line item to proceed further.
Sample:
As 4 is my latest entry, I have to capture '4' in a non-dimensional line item.
I hope your problem is resolved. Let me know if you have any concerns.
Regards,
Kavin.1 -
Oh thats good to know. Thanks!!
I thought in this case they purposely didn't add the top level item .
0 -
Thank you David for your quick response, and solution
Thanks Kavin for an alternative idea, but i am using the 'efficient' one
Have a good day both, as ever the help is greatly appreciated.
0 -
If you haven't already, take a look here
https://community.anaplan.com/t5/Best-Practices/The-Planual/ta-p/49773
We've put all of the "rules" here with some explanations of thew "why".
We are going to add more of the "explanations" for the next version
David
1