Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Siddhanttomar
Contributor
Contributor

apply map ,if

can any one help me with 5th part using these tables 

5.Use If() Condition to generate Full City Name from PFCity Column

full.PNG

Labels (4)
2 Solutions

Accepted Solutions
Vegar
MVP
MVP

  • Create a mapping table using Table C.
  • Fetch  your City ID from Table A by using the SubField() function. (Fetch the second value using / as the delimiter. 
  • Use the CityID as your lookup value on your Table C mapping table.

 

View solution in original post

Taoufiq_Zarra

@Siddhanttomar 

for example you can use this script example :

TableC:
mapping load * inline [
City,City Name
MUM,Mumbai
TH,Thane
PU,Pune
];

TableA:

load Employee,Applymap('TableC',subfield(PFNO,'\',2)) as CityName,PFNO inline [
Employee,PFNO
87,IND\MUM\1234
89,IND\PU\1236
];

 

output:

Taoufiq_Zarra_0-1644997997216.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

5 Replies
Vegar
MVP
MVP

  • Create a mapping table using Table C.
  • Fetch  your City ID from Table A by using the SubField() function. (Fetch the second value using / as the delimiter. 
  • Use the CityID as your lookup value on your Table C mapping table.

 

Siddhanttomar
Contributor
Contributor
Author

can you please explain in little bit in detail with some scripts

Siddhanttomar
Contributor
Contributor
Author

thrid step in detail would more help full

 

Taoufiq_Zarra

@Siddhanttomar 

for example you can use this script example :

TableC:
mapping load * inline [
City,City Name
MUM,Mumbai
TH,Thane
PU,Pune
];

TableA:

load Employee,Applymap('TableC',subfield(PFNO,'\',2)) as CityName,PFNO inline [
Employee,PFNO
87,IND\MUM\1234
89,IND\PU\1236
];

 

output:

Taoufiq_Zarra_0-1644997997216.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Siddhanttomar
Contributor
Contributor
Author

thank you its work