Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlikuser09
Creator II
Creator II

want to create a new row in existing table : data load editor

want to create a new row called "Field ID" in the existing table and assign a  foreign key  to an existing field 

Sample table:

Company codeAttributed fieldsCount
AAManager2
AACIO1
AAIT Staff1
AADev Staff1
AAManagement Total3
AAStaff Total2
ABManager5
ABCIO2
ABIT Staff3
ABDev Staff2
ABManagement Total7
ABStaff Total

5

If attributed fields = 'Management Total " then assign 1

If attributed fields = "staff Total " assign 2.

Desired Output:

Company codeAttributed fieldsCountField ID
AAManager24
AACIO13
AAIT Staff15
AADev Staff16
AAManagement Total31
AAStaff Total22
ABManager54
ABCIO23
ABIT Staff35
ABDev Staff26
ABManagement Total71
ABStaff Total52
1 Reply
Vegar
MVP
MVP

I assume you have a definition for all the keys. In my example below I use Inline[], but you can easily replace it with data from an other source if available. 

Map_field:

Mapping load * Inline [

Management Total, 1

Staff Total, 2

CIO, 3

Manager, 4

];

Load *,

ApplyMap ('Map_field',[Attributed fields]) as [Field ID]

FROM [Sample Table];