Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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));
It also appears that this is a duplicate of this post : https://community.qlik.com/t5/App-Development/How-To-pass-values-in-field-based-on-condition-in-sele... , which @edwin has already responded to in the same way as my reply above. If you've never created a mashup before, I would suggest you look at https://qlik.dev/ and https://extendingqlik.upper88.com/
Hi @Qlik1_User1 ,
It's not clear from your post which API you are using and how. GetSelectedCount() is a chart function, not an API function (unless you have written your own JS function called GetSelectedCount()), and the two cannot be mixed. In your mashup, you would need to use the selection object to find whether a field has been selected, then use this in your code.
It also appears that this is a duplicate of this post : https://community.qlik.com/t5/App-Development/How-To-pass-values-in-field-based-on-condition-in-sele... , which @edwin has already responded to in the same way as my reply above. If you've never created a mashup before, I would suggest you look at https://qlik.dev/ and https://extendingqlik.upper88.com/