How can we get the individual values from lookupfields placed in autogenerated columns?

This is the Sampler example of having lookup fields in autogenerated columns
image

How can we get the individual values from lookupfield’s ?
for example
Lookfield1.getValue() ;
Lookfield2.getValue() ;
Lookfield3.getValue() ;



is there a specific way to get the individual values can you please explain?

Hi,

Could you clarify what are you going to achieve, please? It is easier to get data from the underlying datasource rather than from UI elements.

hello andrey,

i have created lookupfields in generated column as given below

 public Component generateCell(TmpFormulaComponents entity) {
          lkp=componentsFactory.createComponent(LookupField.class);
            lkp.setOptionsList(arr1);
            lkp.setValue(arr1.get(0));
            lkp.setWidth("100%");
         return lkp;
       }
            });

It looks similar to this fig
image

My question is , how to get the selected options of each lookupfield ?
eg : lookupfield no 1 - english
lookupfield no 2 - russia
lookupfield no 3 - english
lookupfield no 4 - english
and so on

Hi,

Thanks for the clarification. I understand that, but what exactly you need to do? Do you want to export these values to CSV or Excel? Do you want to build a report or pass these values somewhere?

In our sample application this column is not bound to an entity, but in a real project it would be easier to define a “Language” attribute for an entity and get all values by querying entities list rather than getting it from UI Table.

Hi Andrey,

I need to store this values and later update into database and i have created the entity for the same .

Hi,

I’ve created a quick and dirty project that writes all values to the log file. Is it what you’re going to achieve? See code attached.

DataCollector.zip (81.8 KB)

Thank you Andrey , it helped :slight_smile: