0

Lets'say I have a relationship field H where the user can choose to add a single entry from any of three different apps (X app, Y app, Z app).

I would like to use this information in a calculation field to calculate results depending on what app the info comes from, rather that the values of the incoming entry.

Is that possible?

experitur
  • 3
  • 3

1 Answers1

0

If there is always only one related item allowed you can use .length. In this case it counts the number of the related items

var $AppX = @TitleFieldAppX.length;
var $AppX = @TitleFieldAppY.length;
var $AppZ = @TitleFieldAppZ.length;
AppX == 1 ? "Calculate this" : AppY == 1 ? "Calculate that" ? AppZ == 1 : "Calculate else" : null

If an item from App x is related than do this calculation, if from App Y .....