Skip to main content
8 events
when toggle format what by license comment
Oct 23, 2013 at 22:52 comment added dklassen Let me understand this, you want to have COLUMN_A = COLUMN_B * a float number? or do you just want Column_A = Column_A * a float number?
Oct 23, 2013 at 9:12 comment added TheBigBoosh56523452435 Thanks for this dklassen. However, I believe this replaces the field array with the source value. I need to multiply a float against each value in the sequence. It's set up right for that it seemed to me, so I just added in the operation to multiply the defined f against sourcevalue. Didn't work. Can you come through again on this for me? Am I wrong? It'd be a huge help...Thanks.
Oct 17, 2013 at 16:16 history edited dklassen CC BY-SA 3.0
Oct 17, 2013 at 16:12 comment added dklassen You could write this script into Python IDLE (C:\Python26\ArcGIS10.0\pythonw.exe) and run it from there. I have edited the code above to be more comprehensive for what you are looking for. The fieldvalues are a python list of fieldnames you want to calculate. The sourcevalue is coming from the field you want to pull the value from - i.e. the source value. This is a ArcGIS python script and will not work for QGIS.
Oct 12, 2013 at 3:44 vote accept TheBigBoosh56523452435
Oct 11, 2013 at 23:00 comment added TheBigBoosh56523452435 ...and, another basic question: where would I write the script? In the field calculator? Where is the Python console built into QGIS?
Oct 11, 2013 at 22:51 comment added TheBigBoosh56523452435 I'm a novice when it comes to Python--and that's saying essentially I know it exists and can deduce the syntax from what I know about objects and methods from my also basic knowledge of javascript. Is firstvalue / secondvalue the actual syntax (since it's not enclosed in asterisks?) And is there any way to loop this to run across all the fields by say, separating the names of the first fields with ','s and then doing the same for the setValue method? Would they correspond?
Oct 11, 2013 at 22:22 history answered dklassen CC BY-SA 3.0