Enabling condition that depends on two variables from different rosters

Hi,
I would like to enable a warning text using enabling condition whereby the warning text should depend on if a variable in a roster is greater than the variable of different roster.

I have two functions of sum of plotsize in deeper roster and sum of cultivated areasize in the other roster.

Warning should occur if areasize is greater than plotsize

Am trying this
(totalarea>=total_plot)

I end up with syntax errors: that says “The name total_plot does not exist in the current context”
whereby total_plot variable is located in the other roster.

I have also tried this
hhm_land_holding.All(x=>(x.totalarea >= x.total_plot))

where

  • hhm_land_holding = roster1 ID
  • total_plot = varible in roster1
  • totalarea = variable in roster2 (current roster)

syntax error am geting: ‘level_hhm_land_holding’ does not contain a definition for ‘totalarea’ accepting a first argument of type ‘level_hhm_land_holding’ could be found (are you missing a using directive or an assembly reference)

Kind help with the right syntax of such condition

This should be possible, but the description is cloudy enough to make a precise advice. In all likelihood, the two rosters are based on different nomenclatures (plots? land holdings? crops?) thus making them incomparable.

Either there must be the same nomenclature (same trigger question) for both rosters, in which case you can directly refer to the variables across both of them, or there must be a nesting (e.g. each land holding contains multiple plots as its constituent parts) to determine the total, or there must be some other mapping defined (e.g. between land holdings and plots). Or you do a check on the grand total only (sum of all plots is smaller than sum of all holdings).

Perhaps share the questionnaire and provide the specific definitions of each of the nomenclature items used, or if you decide to go on on your own, study the BURGERS example from the public questionnaire “Public example User questions and common patterns” shows how to calculate a total from parts: