Post

2 followers Follow
0
Avatar

Counting all relationships

 Hi all 

 

I have an issue in trying to determine how many related items are linked to a person item.

 

I have a people app and a contracts app. In the contracts app people in the organisation register contracts with third parties we deal with. Each contract which is registered must contain "Lodged by" and "Signed by". Person registering the contract would normally choose their own name from relationship field list of people for "Lodged by". Then they would choose another name for "Signed by". I want to know for any given person in the people app how many contracts they are related to either by "Lodged by" or by "signed by". When I do a calculated field to count @All of ContractID and Title.length I can only return the one from "Lodged by". How do I also return the count of items from the "Signed by" relationship. See attached screen shot. It shows Contracts via Lodged by. I ALSO want Contracts via Signed by. Can this be done or can I use Globiflow perhaps.


Annabel Pearce

Please sign in to leave a comment.

6 comments

0
Avatar

Hi Annabel,

if "Lodged by" and "Signed by" both are connected to the people app you should see in the dropdown list of the calculation field 2  times [] All of ContractID and Title - via Lodged By and via Signed By (both incoming). When you type @all of ... and the list pops up, go on typing the complete field name, then you should see both vias (while typing more and more the list gets more and more specific).

The calculation: 
var lodged = @All of ContractID and Title.length;
var signed = @All of ContractID and Title.length;

The token for var lodged must be picked from "via Logded By", the token for var signed from the other via.
if you want the sum: 

lodged + signed

If you want to show each with it's own number:

"Lodged by: " + lodged + "\n" + "Signed by: " + signed

Rainer

Rainer Grabowski 0 votes
0
Avatar

Hi Rainer, 

 

That's the thing, I don't get the "Contracts via Signed by" in the drop down. 

 

There are many more than the 2 fields I showed in the relationship drop down for "Contracts via Lodged by" (about 20), perhaps so many that the other relationship doesn't show up. 

 

How can I select the right token when I cannot see it to choose it. Or can I limit the number of fields I can use for the "@All of blah" in the "contracts via Lodged by"

 

I wonder if I swapped the order of the Lodged by and Signed by fields in the form that this might then allow me to see "Contracts via Signed by"....Lodged by is earlier in the form than Signed by. Once I have it working then I could swap the order back again.

 

I'll try it and let you know

Annabel Pearce 0 votes
0
Avatar

Hi Rainer,

 

Thanks heaps....works perfectly.

yes I am in the Globiflow group but I don't spend much time there because we use Podio under a sharefile authentication and the Globiflow group is under regular Podio authentication. It's annoying that I can't see the Podio group and the Globiflow group from within my sharefile authenticated Podio. To do it I have to log in to Podio in a different browser and I just don't have to the time at the moment to spend any time there unless someone pings me and I get an email or if I am looking specifically for a certain issue.

Annabel Pearce 0 votes
0
Avatar

HI Rainer, 

 

This trick of creating the 'blue' links manually is pretty cool.

 

One more question related to this...

 

Can I find out how many other app templates in all of my workspaces actually refer to my Person app even if no items actually refer to it yet. I want to count all of them in my related items count.

 

I want to try and keep my People app tidy by removing people no longer in the organisation, but I run the risk of removing someone who has been connected to another app (somewhere...anywhere) and losing the reference in the connected items, so I am counting the # related items (in total). To do that I need to know which apps are referencing my People App. (I don't want to miss one) is there are way we can open the People app and see how many other apps reference it.

Annabel Pearce 0 votes