Author Topic: Fill for select list  (Read 1758 times)

rgorantla

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 88
    • View Profile
Fill for select list
« on: October 11, 2017, 11:47:19 pm »
Hi ,

I have a select list with an Id mapped to different column similar to what you have in demo.


https://paramquery.com/pro/demos33/datamap

in this demo: select 1 from column A - column b,c,d populate

Now fill the 2nd row,3rd row with 1st row in column A - column A get populated for both rows but not b,c

Any solution?


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: Fill for select list
« Reply #1 on: October 12, 2017, 09:47:49 pm »
Autofill doesn't work for dataMap.

It works if at least one of the dependent column is converted to formula.

Code: [Select]
            { title: "Name", dataIndx: "name",
formula: function(ui){
var rd = ui.rowData,
id = ui.rowData.id;
if(id){
var item = itemlist.find(function(item){
return item.id==id
});
rd.deliverytime = item.deliverytime;
rd.unitprice = item.unitprice;
return item.name;
}
}
     },

As a side note, converting one column to formula field ( as in code above ) is more performant than converting all dependent columns.
« Last Edit: October 12, 2017, 09:58:07 pm by paramquery »