1

In ArcMap Help it says pageRow is read only, but in explanation it says "The index layer fields can then be read and/or modified as necessary."

(I did not succeed to use it with setValue while getValue worked)

  • it looks like in future it may be possible to use it to write also - similarly to update cursor - see comment from ESRI staff – Abc1 Nov 21 '17 at 18:42
3

Even though it is hard to guess your main purpose by accessing to the row object, the second example on the same help page shows a sample use. The main aim here is to read data from the respective row of the table (as row object) and manipulate it if necessary.

In the example of four-page-map, it changes the title if a column value of the respective row has required information,

e.g. this is where it access to the row object's TSR field value, which is populated either 080102 or 031400 (see the commented part below)

fieldValue = mxd.dataDrivenPages.pageRow.TSR #example values from a field called TSR are "080102", "031400"

then extracts some information

township, range, section = fieldValue[:2].strip("0"), fieldValue[2:-2].strip("0"), fieldValue[-2:].strip("0")

and formats the title as to whether the section part has value, such as:

if section != "": 
    TRSTitle.text = "Section {0} T.{1}N. R.{2}W. W.M.".format(section, township, range)
else:
    TRSTitle.text = "T.{0}N. R.{1}W. W.M.".format(township, range)

In summary, you can read row -information, manipulate and use it somewhere else but cannot change the actual row object value , which is similar to search cursor behaviour.

  • it looks like in future it may be possible to use it similarly to update cursor see this answer – Abc1 Nov 18 '17 at 13:40
0

Info from ESRI staff on "why does it says "pageRow (Read Only)" and at the same time "can then be read and/or modified":

"This has gone un-noticed for a long time. I tested this a variety of ways but it appears to be truly r/o. I can not remember if it was r/w at one point and we forgot to flip the doc.
We will make a correction but it is already too late for the 10.6 release.
Jeff
"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.