Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlik1_User1
Specialist
Specialist

How To pass values in field based on condition in selectMatch api

Hi All,

I am using below API to pass a value in field
app.field('reporting_year').selectMatch(String(new Date().getFullYear()), true)


Is it possible ,if user has already selected a value in "reporting_year" field than pass user selected year else current year (2022)


Using this but  its not working in mashup
if(GetSelectedCount('reporting_year')=0,app.field('reporting_year').selectMatch(String(new Date().getFullYear()), true));

Labels (1)
  • API

1 Solution

Accepted Solutions
Qlik1_User1
Specialist
Specialist
Author

solution - Hyper cube or getContent method( use getselectedcount () in variable and use that variable in this API)

View solution in original post

1 Reply
Qlik1_User1
Specialist
Specialist
Author

solution - Hyper cube or getContent method( use getselectedcount () in variable and use that variable in this API)