<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19019"></HEAD>
<BODY>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN class=364263808-23042011>I am
trying to update multiple values in an edit session via
python</SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN
class=364263808-23042011></SPAN></FONT> </DIV>
<DIV><FONT color=#000080 size=2 face=Arial>mc = self.canvas <BR>layer =
mc.currentLayer()<BR>provider =
layer.dataProvider()
<BR>ob = layer.selectedFeaturesIds() <BR>fid =
int(ob[0])
<BR>newvalues = { fid : { 3 : "<SPAN class=364263808-23042011>lima</SPAN>", 4 :
"<SPAN class=364263808-23042011>city</SPAN>"}}
<BR>provider.changeAttributeValues(newvalues)</FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial></FONT> </DIV>
<DIV><SPAN class=364263808-23042011><FONT color=#000080 size=2
face=Arial>However I am not getting an error nor does the update of the selected
feature take place.</FONT></SPAN></DIV>
<DIV><SPAN class=364263808-23042011><FONT color=#000080 size=2 face=Arial>What
is wrong with my code ?</FONT></SPAN></DIV>
<DIV><SPAN class=364263808-23042011><FONT color=#000080 size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=364263808-23042011><FONT color=#000080 size=2 face=Arial>Or is
there another way of setting field default values ...</FONT></SPAN></DIV>
<DIV><SPAN class=364263808-23042011><FONT color=#000080 size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=364263808-23042011><FONT color=#000080 size=2
face=Arial>Thanks</FONT></SPAN></DIV>
<DIV><FONT size=2><SPAN style="FONT-FAMILY: Verdana; FONT-SIZE: 11pt">Karsten
</SPAN></FONT></DIV></BODY></HTML>