获取 EDT 维度数组元素的索引
我需要编写一个作业,在其中可以获取 EDT 维度的数组元素的索引 例如,在我的 EDT Dimension
中,我有数组元素 A
B
C
当我单击它们的属性时,我看到A 的索引为 1,B 为 2,C 为 3。现在有一个作业 ui 想要获取索引值。请协助。
I need to write a job where i could fetch the index of an array element of EDT Dimension
e.g. In my EDT Dimension
i have array elements A
B
C
when i click over them for properties I see the index for A as 1, B as 2 and C as 3. Now with a job ui want to fetch the index value. Kindly Assist.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不确定我是否理解真正的问题。一些代码示例可以提供帮助。
Dimensions
表有一些有用的方法,例如arrayIdx2Code
。也许下面的代码有帮助:
I'm not sure if I did understand the real problem. Some code sample could help.
The
Dimensions
Table has some useful methods likearrayIdx2Code
.Maybe the following code helps:
我找到了一种方法,但仍在寻找是否还有其他解决方案。
I found a way but still looking if there is any other solution.
您示例中的数组元素
A
B
C
只是简单的标签 - 它们不能用作标识符。首先,为了方便用户,标签可以随时修改,然后即使不修改,不同语言的标签也是不同的,等等。总的来说,您的方法(查询
DictType
)是正确的,但我想不出任何实际需要这样代码的场景。如果您澄清了您的业务需求,有人可以提出更好的解决方案。
Array elements
A
B
C
from your example are nothing else but simple labels - they cannot be used as identifiers. First of all, for user convenience the labels can be modified anytime, then even if they aren't, the labels are different in different languages, and so on and so forth.Overall your approach (querying
DictType
) would be correct but I cannot think of any scenario that would actually require such a code.If you clarified your business requirements someone could come up with a better solution.