Count and sum fields from related items table

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Jaydius
Posts: 43
Joined: Thu Nov 12, 2015

16 Nov 2016

Is it possible to count the number of records in a related items table, and then use the total value to populate a form field e.g. 'Total Related Items'?

Also, is it possible to sum a number field from all related items and also use that totalised value to populate a form field, such as 'Total Hours'?

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

17 Nov 2016

Here is how you can get data from the related items control:

Code: Select all

fd.relatedItems(0).data('ctx').ListData.Row[0].Title
where the first index is 0-based index of the Related Items control in a page, the second – index of the row in the Related Items control, and Title is the internal name of a field.

Just sum values from the required column and put it into a field.

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests