any solution to sort the child table doctype like below “Item Attribute Value” on form load for example or on save , as i have more than 100 attribute value and i want to be sorted by alphabetical for example for specific column like “attribute_value”,
def validate(self):
for i, item in enumerate(sorted(self.item_attribute_values, key=lambda item : item_attribute_values.attribute_value), start=1):
item.idx = i
client side :
var idx = 1;
frm.doc.item_attribute_values.sort(function(a,b){
if (a.attribute_value < b.attribute_value){ return -1 }
else if ( a.attribute_value > b.attribute_value){ return 1 }
return 1;
});
It would be really nice if there was some kind of customizable sort feature built into the tables. This would be really convenient to change the sort on the fly.