Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

datanibbler
Esteemed Contributor

Sorting by names - is there anything to keep in mind?


Hi,

for the HR dpt., I developed an app displaying various personell data - now I want to add the adoptions, that is, all those who were contract workers and have become permanent employees. These have two records in the masterdata table, but with a different number - only the name stays the same.

So I have to start by sorting the data I have by name.

That is why I ask, is there anything I should be thinking of when I sort by name?`Do I have to concatenate first and last name (and a possible middle name) into one string?

Thanks a lot!

Best regards,

DataNibbler

3 Replies
rajeshvaswani77
Valued Contributor III

Re: Sorting by names - is there anything to keep in mind?

HI DataNibbler,

Yes you can concatenate the firstname and lastname and form a key. Change them to upper, since this will be case sensitive. Also in case the numbers for contract contain a different pattern you could consider that as well.

thanks,

Rajesh Vaswani

Re: Sorting by names - is there anything to keep in mind?

HI

You can map field in any order, but field values must map in both tables.

Suppose, in  first table , name contains fullname, and second table full name is separated as firstname and lastname means, you need to concatenate both names and map by field name.

Hope it helps

datanibbler
Esteemed Contributor

Re: Sorting by names - is there anything to keep in mind?

Hi all,

thanks for the quick answers!

I am a bit puzzled: I think what I have done is correct, but it does not return anything:

- I have concatenated first_name and last name like this:

     TRIM(vname) & TRIM(nname) as name

- Then I have done a RESIDENT LOAD with a WHERE clause using the PEEK function:

       LOAD
            Name

       RESIDENT ...

        WHERE Peek(Name, -1) = Name

That, however, returned 0 records. I guess then I'll have to get back to HR about that.

Best regards,

DataNibbler

Community Browser