Page 1 of 1

Related Items - On Change / Event Handler

Posted: 17 May 2017
by joss.wilde
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:

Code: Select all

fd.relatedItems(0).data('ctx').onchange()
However, perhaps unsurprisingly that doesn't work.
Any suggestions of advice would be appreciated.

Thank you,
Joss.

Re: Related Items - On Change / Event Handler

Posted: 17 May 2017
by joss.wilde
OK to partly answer my own question, which I found after reading the documentation on here it seems you can do this:

Code: Select all

fd.relatedItems(0).change(function() { });
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 :)

Re: Related Items - On Change / Event Handler

Posted: 18 May 2017
by Dmitry Kozlov
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.

Re: Related Items - On Change / Event Handler

Posted: 18 May 2017
by joss.wilde
This is good to know, thank you Dmitry. I can send the request to support then no problem.