Reputation: 119
I am currently creating a document that changes field visiblty and changes field positions, i can manipulate fields just fine but what i want to do is move objects between pages. From what i have discovered this is not possible without removing the field from the page and recreating it on another. To do this i will require to copy all properties to the new object.
Is there a way for me to get field properties as a dictionary to then populate the new field properties? Below is what i was expecting to use:
var field = this.getField("myFieldName");
var properties = field.properties;
UPDATE: I have found the code below but it returns an error after iterating a few entries:
InvalidGetError: Get not possible, invalid or unknown.
var field = this.getField("myFieldName");
for (x in field) {
console.println(x);
console.println(field[x]);
}
Upvotes: 1
Views: 977
Reputation: 119
I manged to figure it out:
var field = this.getField("myFieldName");
for (x in field) {
console.println(x);
try {
console.println(field[x]);
}
catch(err) {
console.println("Error: " + err);
}
}
Upvotes: 1