Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ashishpalkar
Creator III
Creator III

By Default always first record should be selected

Hi There

I have one requirement , when user open dashboard or click on clear all always show first row record.

I have tried using - Action - Select in field but not able to get the results.I

Thanks in advance.

7 Replies
sunny_talwar

What trigger are you using? Can you share some screenshots?

ashishpalkar
Creator III
Creator III
Author

Actions - ADD - Selection - Select in Field

ramoncova06
Specialist III
Specialist III

what value are you using in the select in field ?

ashishpalkar
Creator III
Creator III
Author

I am using Primary Key (ID).

ramoncova06
Specialist III
Specialist III

are you doing something like =min(ID) ?

did you set this as an on open trigger ?



chaper
Creator III
Creator III

Try FieldValue or FieldIndex or FirstSortedvalue

From QlikView help File

Fieldvalue(fieldname , n)

Returns the field value found in position n of the field fieldname (by load order). Fieldname must be given as a string value, e.g. the field name must be enclosed by single quotes. The first field value is returned for n=1. If nis larger than the number of field values, NULL is returned.

Example:

fieldvalue( 'Helptext', 5 )

FieldIndex(fieldname , value )

Returns the position of the field value value in the field fieldname (by load order). If value cannot be found among the field values of the field fieldname, 0 is returned. Fieldname must be given as a string value, e.g. the field name must be enclosed by single quotes.

Example:

fieldindex( 'Name', 'John Doe' )

FirstSortedvalue([ distinct ] expression [, sort-weight [, n ]])

Returns the first value of expression sorted by corresponding sort-weight when expression is iterated over a number of records as defined by a group by clause. Sort-weight should return a numeric value where the lowest value will render the corresponding value of expression to be sorted first. By preceding the sort-value expression with a minus sign, the function will return the last value instead. If more than one value of expression share the same lowest sort-order, the function will return NULL. By stating an n larger than 1, the nth value in order will be returned. If the word distinct occurs before the expression, all duplicates will be disregarded.

Example:

Load Customer,

firstsortedvalue(PurchasedArticle, OrderDate) as FirstProductBought from abc.csv

group by Customer;

ashishpalkar
Creator III
Creator III
Author

Hi Grossi

I came across one situation using your solution.

I have created search box and it has 4 filter criteria, Name, ID , ID2 and ID2.

User can search for anything of above 4. When apply your logic only ID search is getting executed  after searching for name etc.

Ant suggestions?