Post

2 followers Follow
0
Avatar

For Each look up on Related Item

I have two apps A & B in app A I have a calculation field that (should) search the titles of each item in App B. If there is a match, then show several fields from B in the calculation field in A.

Is this possible?

Jeff Dougherty

Please sign in to leave a comment.

3 comments

0
Avatar

Hi Jeff,

yes possible if all the B-items are related to the A-item: 

var string_to_match = "whatever you want"
var title = @all of title;
var field1 = @all of field1;
var field1 = @all of field2;

var result = [];
for(var i = 0; i < title.length; i++){
if(title[i].indexOf(word_to-match) > -1){
result.push(field1[i] + "\n" + field2[i]);
}
};
result.join("\n\n")

If the B-items are not directly related to the A-item you need a workaround , e.g. all B-items and all A-items are related automatically by Globiflow to a third app C which has only one item. That C-item has a calculation field which holds the title and all the other fields from B. Then your calculation in A searches in the C-item's calc field content and pulls the needed data. 

I use that way very often so I'm able to search for the contents from thousands of items in many different apps in many different workspaces. 


Rainer

Rainer Grabowski 0 votes
0
Avatar

Hi Ranier,

I have a similar issue, but not sure how to do it. I have app A, which links to multiple items in app B. I would like to have a for each in A that will lookup a field in B and return all results for the related items for that field. No Match Required as per original question.

Jeff Dougherty 0 votes