Skip to Content
avatar image
Former Member

Match Pattern in variable

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.

Test Data.PNG (15.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jul 28, 2015 at 05:19 AM

    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.



    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 28, 2015 at 07:19 AM

    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).


    Add comment
    10|10000 characters needed characters exceeded