on 08-02-2016 11:54 AM
Hi,
I need to find a RegionCode (Data Type) using the description, for example if I have 'Liverpool' I want to get its code 'LV'.
Is there any way to do this using scripting?
I know that using the QueryCodeListIn Web Service I can get all the values for a specific country but I would like to avoid this workaround.
Thanks,
Alejandro Cordero.
Hello Alejandro,
I've never found a way to achieve it. I think it's not possible.
I found only the opposite operation available, to get a description based on a value.
Regards,
Alexandre.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not sure if I understood your question correctly, But if you have liverpool and you want to get its code then you can use foreach loop in ABSL and use getDescription function for the element and compare 'Liverpool'. If it matches then use your element.content to get its code.
But I am not sure if I understood your question. Sorry in advance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Horst,
I've tried your code but when I run it, myRegionCodeDesc is empty, we need to have a listID and a content (Code) in order to get the description, for example:
import ABSL;
import AP.Common.GDT;
var myRegionCode : RegionCode;
myRegionCode.listID = "GB";
myRegionCode.content = "LV";
var myRegionCodeDesc = myRegionCode.GetDescription();
myRegionCodeDesc will have the value 'Liverpool', that is fine, but my requirement is the opposite, having 'Liverpool' I want to get the Content (Region Code).
Thanks,
Alejandro Cordero.
Hi Alexandre,
Thanks for the idea, I already implemented it and it is working. Fortunately I do not need all the existing values otherwise it will be a nightmare.
It is a pity that we can access to that information using the CodeList Web Service and we cannot do it using ABSL
Regards,
Alejandro Cordero.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.