Related Items - On Change / Event Handler
-
- Posts: 18
- Joined: Wed May 17, 2017
Hello there,
Hopefully this hasn't been asked before, but apologies if so and feel free to direct me to the forum or blog post.
I think what I am trying to do is fairly simple, which is update a field on a form based on the sum of a column of a related items list. I am editing the related items list via quick edit as it is faster this way, however is it possible when an item is added for an event handle or onchange function to be called to update a field value?
I was thinking something like: However, perhaps unsurprisingly that doesn't work.
Any suggestions of advice would be appreciated.
Thank you,
Joss.
Hopefully this hasn't been asked before, but apologies if so and feel free to direct me to the forum or blog post.
I think what I am trying to do is fairly simple, which is update a field on a form based on the sum of a column of a related items list. I am editing the related items list via quick edit as it is faster this way, however is it possible when an item is added for an event handle or onchange function to be called to update a field value?
I was thinking something like:
Code: Select all
fd.relatedItems(0).data('ctx').onchange()
Any suggestions of advice would be appreciated.
Thank you,
Joss.
-
- Posts: 18
- Joined: Wed May 17, 2017
OK to partly answer my own question, which I found after reading the documentation on here it seems you can do this:
However, although this does work it only seems to detect changes on the first column of the grid. As my understanding of relatedItems is limited any more advice would be welcome 
Code: Select all
fd.relatedItems(0).change(function() { });

- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi,
For now, the Related Items control does not support 'change' event. Our support team can implement it for you. Please, send the request to support@spform.com with the detailed description of your case and we will estimate it.
For now, the Related Items control does not support 'change' event. Our support team can implement it for you. Please, send the request to support@spform.com with the detailed description of your case and we will estimate it.
-
- Posts: 18
- Joined: Wed May 17, 2017
This is good to know, thank you Dmitry. I can send the request to support then no problem.