Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
tchovanec
Creator II
Creator II

Action in a textbox

I currently have this expression in a text box. This is giving me the current number I want.

=SUM(AGGR(IF(FirstSortedValue(                                                                       
{<

ADMIT_DT ={">=$(=NUM(ADDMONTHS(MONTHSTART(MAX(ISLAND_CALENDAR.DATE)),-12)))<=$(=MA(ISLAND_CALENDAR.DATE))"},
FLG_Z_PATIENTS = {0},
ISLAND_DEPT.DEPT_ABBR = P(DEPT_ABBR)
                                                               
>}
DISTINCT DEPT_ABBR,-ADMIT_DTTM)=ISLAND_DEPT.DEPT_ABBR,1,0),MRN,ISLAND_DEPT.DEPT_ABBR)) 

I then want to put an action on this text box to select the MRN’s. Here is what I have tried with no luck.

='(' &CONCAT(AGGR(IF(FirstSortedValue(

{<
ADMIT_DT ={">=$(=NUM(ADDMONTHS(MONTHSTART(MAX(ISLAND_CALENDAR.DATE)),-12))) <=$(=MAX(ISLAND_CALENDAR.DATE))"},
FLG_Z_PATIENTS = {0},
ISLAND_DEPT.DEPT_ABBR = P(DEPT_ABBR)                                                                            
>}
DISTINCT DEPT_ABBR,-ADMIT_DTTM)= ISLAND_DEPT.DEPT_ABBR,1,0),MRN,ISLAND_DEPT.DEPT_ABBR)DISTINCTMRN, '|') & ')'

Can this be done in a text box where I am using the aggr function? Any help would be appreciated. Thank you.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try this expression for the search string:

='(' & concat(DISTINCT AGGR(IF(FirstSortedValue(

  {<

  ADMIT_DT ={">= $(=NUM(ADDMONTHS(MONTHSTART(MAX(ISLAND_CALENDAR.DATE)),-12))) <=$(=MAX(ISLAND_CALENDAR.DATE))"},

  FLG_Z_PATIENTS = {0},

  ISLAND_DEPT.DEPT_ABBR = P(DEPT_ABBR)

  >}

DEPT_ABBR,-ADMIT_DTTM)= ISLAND_DEPT.DEPT_ABBR,MRN),MRN,ISLAND_DEPT.DEPT_ABBR),'|')  & ')'


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
preminqlik
Specialist II
Specialist II

HI THERE ,

first you select MRN in list box then create a newbookmark

now create your text box,go to actions > bookmarks>apply book marks>enter book mark ID

tchovanec
Creator II
Creator II
Author

I cannot select the MRN's in a list box because this is all dependent on the number in the text box. If I have 15 in the text box then I want to click the text object and select those 15 MRNs.

Gysbert_Wassenaar

Please post a sample document that demonstrates the problem. See this document for how to do that safely: Preparing examples for Upload - Reduction and Data Scrambling


talk is cheap, supply exceeds demand
Gysbert_Wassenaar

Try this expression for the search string:

='(' & concat(DISTINCT AGGR(IF(FirstSortedValue(

  {<

  ADMIT_DT ={">= $(=NUM(ADDMONTHS(MONTHSTART(MAX(ISLAND_CALENDAR.DATE)),-12))) <=$(=MAX(ISLAND_CALENDAR.DATE))"},

  FLG_Z_PATIENTS = {0},

  ISLAND_DEPT.DEPT_ABBR = P(DEPT_ABBR)

  >}

DEPT_ABBR,-ADMIT_DTTM)= ISLAND_DEPT.DEPT_ABBR,MRN),MRN,ISLAND_DEPT.DEPT_ABBR),'|')  & ')'


talk is cheap, supply exceeds demand
tchovanec
Creator II
Creator II
Author

That was it, I was pretty close. Thank you very much.