I'm writing a custom action. I have Context as input.
My fields structure:
TABLE:
- ROW 1
- FIELD1
- FIELD2
- ...
- ROW 2
- FIELD1
- FIELD2
- ...
- ...
So, I have access to current field (for example FIELD1), but I want to have access to another field (FIELD2) in the same row.
How can I reach that field?
So, I need to get ROW1 from FIELD1. After that I can easily reach FIELD2 by name. I could not find it in documentation. Only selectors to children, not to parent.
コメント
3件のコメント
Hello,
Please note that all the fields that are involved in scripts should be added to the "available fields" list and, if you want to change these fields, the "read-only" checkmark should be unselected. Fields insides scripts could be accessed by their full names or aliases. But when you are working with repeating groups or tables, to get access to all the rows/group instances by their number you should implement these scripts on higher level that the "Table"/"Repeating group" fields e.g. on the level of Document Section.
For doing this the construction:
Document.Field("the Table").Items[i].Field("the Column").Text, where i = row’s number
can be used.
Please inform us, if this logic is not option for you.
Thanks, Ekaterina
That is totally clear, if you know row id.
What we want to implement: want to have Custom action on the FIELD1, by clicking this action FIELD2 suppose to be filled based on FIELD1 value.
I can create custom action on FIELD1, but I can not reach FIELD2 in the same row. I need to know row id in your approach.
Maybe somehow can I get current row id from my custom action?
Hello,
On the level of table cell (or element of repeating group) no information about row (instance) number and rows (instances) count is available. Row or instance number can be found and used only in scripts belonging to the higher level element that table row/group instance.
サインインしてコメントを残してください。