Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi.
In my application I set the variables "Weight From" and "Weight To" and I need to select the AnimalIDs that are within that weight range wite a button Action. As seen in the image
Regards.
if the ask is to add this business logic in your expression, add it in set analysis:
sum({<WEIGHT={">=$(vWeightFrom)<=$(vWeightTo)"}>}yourmeasure)
Hi Edwin.
Thanks for answering.
I need to select the IdAnimal whose weight is within that range.
I had thought of button action.
Regards.
I have achieved it through a button action, with the following macro:
Sub Selection
vFirst= ActiveDocument.Variables("vPesoDesde").GetContent.String
vLast= ActiveDocument.Variables("vPesoHasta").GetContent.String
mySelect= ">=" & vFirst & " <=" & vLast
ActiveDocument.Fields("Peso").Select mySelect
ActiveDocument.Fields("IdAnimal").SelectPossible
ActiveDocument.fields("Peso").Clear
end sub
Regards.
if that is the behavior you wanted you can use variable triggers in document settings > triggers
choose teh variables in input add action SELECT FIELD, enter animalID and in expression:
='(' & concat({1<Peso={">=$(vPesoDesde)<=$(vPesoHasta)"}>}IdAnimal,'|') & ')'
when you enter a value in teh variables, the action will trigger. to test you want to get the values:
(0111|0123|0234) which are the animal IDs where weight is between the two variables