I am trying to create a button that change the entity name of current entity by combining iteration number (iterating over related entities, i.e. index number) and a value from current field—either by getting an array and comparing ID/Name, or a simple index property. Using the actual task ID is a tad too unreadable.
Goal:
- Feature entity, with many Task entities
- Task entity, with one Feature
- In the Task, click on button that rename its own Name field
Example:
Many tasks belong to a “Picture wall” feature, and I want to be able to click the button on one task and it will change name to the current tasks index number + text from one of its other fields.
In my “Tasks” table the name of the task is completely irrelevant, but I still need to make use of it for references (mentions) to it in the details field of other tasks. There’s not much to say about the task that makes it unique, so we’ll end up being confused about which task we are referencing.
Therefore, clicking a button that generates a compound name of sorts, that also includes a unique number as well, for a name like: [Feature name property] [index] [specific property in task]
.
I’m adept at JavaScript in general, but I don’t quite get the inner workings of the API available for Buttons, and there’s not much documentation to go on yet. My main issue right now is how to get an array of related entities so I can use it to get appropriate index number.