Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show listbox fields based on expression in Textbox action issue

Hi, im trying to create a button where all the fields for a specific expression will show on the listbox when i click a textbox with a action.

So one of the expressions i used in the textbox action with Toggle Select:

Field :

LanID

Search String:

='= count(DISTINCT {<Year={"$(vMaxYear)"},date={"<=$(vMaxDate)"},Month=,Day=,YearMonth= >}  LanID)'

and this works.

This is the expression that doesnt work.

='= sum(  {<Year={"$(vMaxYear)"},date={"<=$(vMaxDate)"} ,Month=,Day=,YearMonth= >}

aggr(count(DISTINCT {<Year={"$(vMaxYear)"},date={"<=$(vMaxDate)"} ,Month=,Day=,YearMonth= >}

{<LanID = {"=count(distinct  {<Year={"$(vMaxYear)"},date={"<=$(vMaxDate)"} ,Month=,Day=,YearMonth= >}  DocName)<=2"}>}LanID),LanID))'

How can i solve this ?

2 Replies
Not applicable
Author

Your expression is wrong inside AGGR function

Try like below:

= sum(  {<Year={"$(vMaxYear)"},date={"<=$(vMaxDate)"} ,Month=,Day=,YearMonth= ,LanID={"=count(distinct {<Year={"$(vMaxYear)"},date={"<=$(vMaxDate)"} ,Month=,Day=,YearMonth= >} DocName)<=2"}>}

   aggr( count(DISTINCT {<Year={"$(vMaxYear)"},date={"<=$(vMaxDate)"} ,Month=,Day=,YearMonth=,LanID={"=count(distinct {<Year={"$(vMaxYear)"},date={"<=$(vMaxDate)"} ,Month=,Day=,YearMonth= >} DocName)<=2"} >} LanID), LanID )

     )

Not applicable
Author

Hello thank you for your reply,

my concern is regarding the action button and the "select in field" function

This Code works :

='= count(DISTINCT {<Year={"$(vMaxYear)"},date={"<=$(vMaxDate)"},Month=,Day=,YearMonth= >}  LanID)'

but this wont :

='= sum(  {<Year={"$(vMaxYear)"},date={"<=$(vMaxDate)"} ,Month=,Day=,YearMonth= 

,LanID={"=count(distinct {<Year={"$(vMaxYear)"},date={"<=$(vMaxDate)"} ,Month=,Day=,YearMonth= >} DocName)<=2"}>}

     

       aggr( count(DISTINCT {<Year={"$(vMaxYear)"},date={"<=$(vMaxDate)"} ,Month=,Day=,YearMonth=,   

     

       LanID={"=count(distinct {<Year={"$(vMaxYear)"},date={"<=$(vMaxDate)"} ,Month=,Day=,YearMonth= >} DocName)<=2"} >} LanID), LanID ) '        )

what is the problem here ?