Answered

Is it possible to replace Text Variable with text input from another question?

  • 19 December 2021
  • 13 replies
  • 934 views

Userlevel 3
Badge +1

My CRM only has one input for “company name”. But I would also like to make the Typeform experience more personal, having a different branch for teachers, with their school name becoming the input for “company name” in CRM.

Here’s an example of what I want to do:

  • Question 1: Do you work for a company or teach at a school? [Drop down]
  • Logic branch to 2 questions based on Q1 answer:
  • Question 2a: What’s the name of your company? [Short text]
  • Question 2b: What’s the name of your school? [Short text]
  • Combine both answers into a single Text Variable for upload to CRM

I had hoped this was possible, since you can “Always” “Add” a number from a Number Question to create a Number Variable.

But when I try this with a text variable. I can only “Replace” the text variable with text that I type.

Am I missing something really obvious?! I was hoping to avoid having to combine these fields in Excel / Google Sheets.

Any help would be really appreciated!

icon

Best answer by DavidD 19 December 2021, 23:25

View original

13 replies

Userlevel 3
Badge +1

OK, I think I may have worked out the answer to my own question.

I create a Text Variable to be @recalled as the follow-up question text. And then replace that text variable for either role based on an “If”, “Then” logic for both roles.

That would mean no logic branch needed.

I’ll test if that works.

But I still think feature parity with the Number Variable would be useful.

Userlevel 3
Badge +1

If anyone else is curious – it DID work (sort of). But it feels like one hell of a workaround!

Here’s a before and after of the logic:

BEFORE

 

AFTER

 

I was also able to apply the same approach to having just one email address question.

But because those answering Question 10 (personal users) don’t need to answer Question 11 (which company / school?), it is missing when @recalled in Question 12. And that leaves a really ugly underscore line (which I hoped would be just blank with no space).

Anyway...all that to say that it would be easier just to have a “Company” text variable and an “Email address” text variable, which can receive the user text input from different question branches!

Quick tip: In my questions, I’m using bold text to highlight the important part of the statement. E.g.

“That’s great. Which company do you work for?”

I wasn’t expecting to be able to do that when setting the Text Variable for Question 11. But you can by enclosing the text in single asterisks that you want bold.

“That’s great. *Which company* do you work for?”

I just tested it for italics and it works if you use underscores “_Which company_”

Userlevel 7
Badge +6

@DavidD - you can create all the variable you want by defining them in the Advanced Logic area. You would simply then have to replace the variable text string with the answer to the appropriate question ie:

  • replace company with q2 (the response from q2

then if you @recall the variable company to a question it would show up … 

you could also say “So you work at @company.”  or “So you work at @q2”  - either way, you would get the same output on the page (assuming you did do the replace logic line above) - seems like some duplication but if that works for you….

 

des

Userlevel 7
Badge +5

Thanks for sharing your solution, @DavidD and for the additional idea, @john.desborough !

Userlevel 3
Badge +1

Thanks for updating this question. And yes, big thanks to @john.desborough for your response and help.

@Liz would it be possible to one day be able to replace a Text Variable with input from a Short Text question? The uses for this would be numerous, including being able to “concatenate” answers within Typeform before data export.

Userlevel 7
Badge +5

Hi @DavidD I can definitely share this idea with the product team! :grin:

Userlevel 1
Badge

@Liz 

I vote for this too !

to replace text variable with answer of a text question will be GREAT.

there a lot of uses with it,

 

Userlevel 7
Badge +5

Yes, there would be, @Deka ! :grinning: If this is added to the roadmap, I’ll let you know!

Is this still the only way to assign a question answer to a variable?  Seems like there should be an easier way.

Userlevel 7
Badge +5

Hi @Jake Charlson Yes, you’ll need to use logic to assign this data. 

Hi @Jake Charlson Yes, you’ll need to use logic to assign this data. 

Hi Liz, so I’m a little confused.

 

Is this workaround the only way to assign a question answer to a variable?

or

Is there a way to recall an answer into a variable text field that I’m not seeing?

 

I have a text variable named “contact”.  I want to replace that starting value in my contact variable with the contact information submitted by my customer so I can avoid this:

Customer Contact Info:
Phone: [Not asked] | [Not asked]
Email: [Not asked] | customer@email.com

and just have the one contact variable called in the notification with the customer’s entered information.

But, I can’t seem to recall information into a variable.  As shown below, when I enter an @ symbol, no menu pops up to select what information to recall.

 

Userlevel 7
Badge +5

Hi @Jake Charlson Ah, I see. It’s not possible to replace a variable with another variable. You’ll need to input the text you’d like to replace it with there. 

 

@Liz – Jumping into this thread as it looks like this is still a missing option within the logic functionality.  Can you provide any updates on the status of this feature on the roadmap?  Thanks!

Reply