Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to Replace the Text values in a Paragraph with Field Values in another Table?

Hi all,

I'm having a Paragraph as below in Table

para.PNG

and  ID table as below. The task is I need to replace the "Names" in Paragraph with respective ID's

name.PNG

Result I need is as Below

para1.PNG

1 Solution

Accepted Solutions
sunny_talwar

Something like this

Mapping:

Mapping

LOAD * INLINE [

    Name, ID

    Steve, 1

    Rajesh, 2

    Vicky, 3

];


Table:

LOAD Paragraph as OriginalParagraph,

MapSubString('Mapping', Paragraph) as Paragraph;

LOAD * INLINE [

    Paragraph

    "Steve is Retailer, Rajesh is his Consumer, Vicky is Manufacturer and Rajesh is his Worker"

];

View solution in original post

5 Replies
YoussefBelloum
Champion
Champion

Hi,

you can combine functions like Replace with a Mapping load and Applymap()

sunny_talwar

May be use MapSubstring

sunny_talwar

Something like this

Mapping:

Mapping

LOAD * INLINE [

    Name, ID

    Steve, 1

    Rajesh, 2

    Vicky, 3

];


Table:

LOAD Paragraph as OriginalParagraph,

MapSubString('Mapping', Paragraph) as Paragraph;

LOAD * INLINE [

    Paragraph

    "Steve is Retailer, Rajesh is his Consumer, Vicky is Manufacturer and Rajesh is his Worker"

];

Anonymous
Not applicable
Author

Ya Thanks Bro,

It worked

YoussefBelloum
Champion
Champion

Was thinking about this but with the Replace() function. this is def better