Hi there,
I am using ARIS 10 SR 21 Enterprise edition, ARIS Architect.
I want to output functions on a model (EPC row) with certain attributes sorted by serial number attribute in ascending order.
I am facing a challenge when sorting my query & report outputs by Sr. No. attribute. I have selected the correct sort in query template editor however the output gives me erraneous sorting when the number of functions exceed 10. For a model with less than 10 functions I get the right sort order, however when the number of functions exceed 10 the sorting gives me incorrect output.
Sorting when functions less than 10 >> 1,2,3,4,5,6,7,8,9
Sorting when number of functions greater than 10 >> 1,10,11,12,13,2,3,4,5,6,7... (this is consistent across models with more than 10 functions).
I am facing the same issue when using Queries and also when using WSIWYG report editor.
Is this a known issue? Any help on what I could be doing wrong/ solutions would be appreciated.
Thanks!
Utsav
Hello Utsav,
I assume your Sr.No. attribute is user defined. But is its data type integer? The sorting problem is common on Windows (Explorer) and in Excel as well. Mostly because numbers are interpreted as text.
You could
- define a new attribute of the right data type
or instead use the default attribute AT_ORD_NUM (int) in your filter - convert strings to integers in your report script before sorting the output
- work around the problem with padding zeros
But I see also methodical issues here (cf. this discussion): Ordinal numbers for process steps are not part of the ARIS concept because
- process control flows can fork and there is no intuitive decision which numbering sequence should prevail in parallel paths
- functions can be re-used in several process models and occur in different order (e.g. as process variants or as process interfaces). An attribute can only reflect one state of the object definition, not of all its occurences.
Regards, Martin
Thanks Martin for your response. Indeed the attribute is a user defined attribute and its data type is currently 'Multi line text'.
For the set of solutions you mentioned,
1) define a new attribute of the right data type or instead use the default attribute AT_ORD_NUM (int) in your filter - Is it possible to change the existing user attribute type Sr. No to Integer data type?
2) convert strings to integers in your report script before sorting the output - I am a beginner in java scripting, for the most part I stick to the WYSIWYG editor for generating reports. Can you pelase guide me how I can edit the code and convert the string to integer?
3) work around the problem with padding zeros - can you please provide more clarity on this? How should I go about it.
I understand your point about the method aspect and why serial numbers should be avoided. Currently our report requirements require ordinal ordering for process steps for stakeholder clarity, I will parallelly evaluate how we can go about this.
Thank you for your time.
Regards,
Utsav
Hello Utsav,
1) existing attributes cannot change data types. But to avoid too many breaking parts in your modeling & evaluation chain you shhould consider redesigning your filter with the right attribute type. Existing Sr.No. values can easily be coopied to the new attribute
2) you would need to use the code editor instead. In javascript you can have an implicit data type conversion by assigning the string value to a new variable and multiplying by 1.
3) Like Veronika suggested: if you fill in leading zeros it is still considerd as text but sorted as expected by humans. Either you fill the attribute with "00n" or you concatenate zeros as strings in your query and in your javascript report:
// if you already have s.th. like
var serialNo = getValue(YourUserDefinedAttributeTypeNumber);
// concatenate it with 0 as a string
serialNo = serialNo + "0";
Regards, Martin
Hi Martin, thanks for your response. I beleive that the first alternative you mentioned would be the most robust way to go. I can create a new attribute with the right datatype, how should I go about mapping all the existing attributes for Serial number to the new attribute? Is there a way I can do it globally for the entire database?
Thanks,
Utsav
after extending your filter
a) you open the attribute on all function definitions and copy the complete Sr.No. row values into the new attribute
b) you use the export & import for translation reports. here you would need to freeze the db while working on it.
Regards, Martin