cancel
Showing results for 
Search instead for 
Did you mean: 

Match Pattern in variable

Former Member
0 Kudos

Hello Experts.

Can some one please suggest me a solution for my issue.

I have a report on survey which is pulling question from question table and answers and comments from answer table

As the Answers and comments are saved to the same table but under different answerID, they are displaying in the same column when the AnswerID is pulled in to the table.

But as per the requirement, I need to make sure that I get comments on the seperate column for corresponding answer.

I tried Match pattern on QuestionID but I experienced an issue where the Main question is disappearing from the table. Even though comments belong to the parent question, each comment is tied to ChildquestionID.

Plesae see the attached screenshot for further detail.

Accepted Solutions (1)

Accepted Solutions (1)

tanveer1
Active Contributor
0 Kudos

Hi Rishi,

looking at the data, i think you can create a variable to truncate Desc part from the Question1Desc.

use the formula Replace = replace ([QuestionID];"Desc";"")

Now this formula will replace all your DESC text with nothing. so you data will be some thing like question1, question1 etc.,

Now use this in your table

Replace---- first([Description]) ---- first([Answer]) --- last([Answer])

I have used first and last functions to avoid #multivalues and also get the results as we require.

let me know how this works.

Thanks,

Tanveer,

Answers (1)

Answers (1)

Former Member
0 Kudos

One thing I saw in your dummy data is, you are having "Questin1" (wrong or different spellings here) and "Question1Desc" (different spellings). Will it be like this or is it a typing error? If typing error then above will work. Also there is can be another way in which you create 2 queries for answer and comments separately with the same question and merge them(you need to make both of them same say Question1 and Question1).

-Ankush

Former Member
0 Kudos

That was a typo error.