What is the fastest way to get List LABELS (!!) in C# and JS?

Hi community,

does anyone know a fast way to get the labels of list items in C# and JS?

I am writing a small Jira connection were I transfer the content of a regular Innovator item. The item has a dropdown list. We can get the selected dropdown value quite easily with something like this.getProperty("mylist","");

But in my Jira item I don´t want to display the list value, but the list label. In best case I even want to specify the target language of the label that should be used. 

Currently I know two options, but both require too much code for my taste:

1. Make a "get" query against the "Value" table. 
2, Get the full list item with all values and labels and than match the current property value with the full list. 

First option works fine when we only need to get the label of a single dropdown value. But it would produce a large amount of queries if we have multiple items in a loop. 
The second options works better for multiple items, as we only have to get the complete List one time. 

But I wonder if there is an inbuilt function to make this all easier to do by default?

Does anyone know more?

Thanks!

Angela

Parents Reply Children
  • Thanks for the fast replay!

    I use getListValues for the 2nd option and JavaScript. Unfortunately it doesn´t work with multi-lang strings, but this is a problem to ignore most of the time.

    I so far haven't found a similar function for c#. Do you know if there is any?

    Before somebody ask: Yes - we can do all of this with AML. The whole question is more about having a more convenient option to get the labels.