Constructing variables for output

Discussions about editing and cleaning data
Post Reply
Nikicspro
Posts: 1
Joined: January 24th, 2014, 4:01 pm

Constructing variables for output

Post by Nikicspro »

Hi all,

I am facing two issues I request your help with:

First, I have a field where the user is supposed to enter a Department number (that range from 1-23). I want to write in the logic so that in the CSV output, I can transform these answers into 23 dummy variables. I cannot seem to figure out how to do that.

Secondly, I want to create a variable in the backend that would use the answers filled in for specific questions (i.e. quantity purchased, unit measured, frequency purchased) to be put into a formula to come up with an annualized purchased amount. I also want this variable to show up in the CSV output.

Your help is greatly appreciated!

Thanks!

Niki
Gregory Martin
Posts: 1795
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Constructing variables for output

Post by Gregory Martin »

When you are talking about CSV output, are you talking about an output from the Export Data tool? If so, there are two ways to do this:

1) Modify your dictionary to add the 23 dummy variables, plus the result of your formula. Then, create a batch edit application where you assign to these 24 variables the correct values. Then when you export your data from the Export Data tool, you'll have these values.

2) Create a batch export application and use the working storage dictionary for these 24 variables. This is a bit more advanced, but you'll find some hints on how to do this here: http://www.csprousers.org/2011/12/09/si ... h-exports/
Post Reply