Forum Discussion
Can anyone give me any idea?
How is your method currently implemented?
- Mavis5 years agoIdeator I
hi , silje.dahl
Are you asking about my solution?
I use the same on change method for the A, B, C, and D field events
When the value of field A, B, C, D is changed, go to the field A1, B1, C1, D1
Because my initial context setting is to backfill the A1 field after the value of A has been changed according to A
So I use a loop to search for the fields on the screen in the on change event
I found the A field and determined that it had a value before backfilling it to A1.I'm not good at English, so I'm using a translator for the above description.
If you don't understand what I mean
The code in the picture below is for your reference- silje_dahl5 years agoIdeator I
Hello,
I'm new to JS methods in ARAS myself, so please excuse me if I don't interpret the issue correctly.
Does this have to be automatic? Could you not simply pass the name of the current field to the on_change function?
I.e. have on_change take parameters such as
("propertyToUpdate", "otherPropertyToUpdate")
Or if the A1 field doesn't have an attached property:
("propertyToUpdate", "otherHTMLFieldToUpdate")
Then in the function, you could first update the main property:
handleItemChange(propertyToUpdate, document.getElementById(propertyToUpdate).value);
Then depending on whether A1 is connected to its own Innovator item or if it's just an HTML field:
handleItemChange(otherPropertyToUpdate, document.getElementById(propertyToUpdate).value);
orvar otherField = document.getElementById(otherHTMLFieldToUpdate);
otherField.value = document.getElementById(propertyToUpdate).value;
I don't know how to update how the on_change method is attached to the field but you may have already solved that - otherwise maybe you could do something like this:var fieldA = getFieldByName(propertyName);
var fieldAElement = fieldA.getElementsByTagName("input")[0];
fieldAElement.onChange = `on_change("requ_beforedt", "otherPropertyOrFieldToUpdate")`
- Daniels195 years agoIdeator I
Hello,
Thanks for the update and quick reply. I'll be sure to keep an eye on this thread. Thanks for creating it. Looking forward for solution.