smokeyjones Posted October 21, 2009 Posted October 21, 2009 Hi, I'm trying to generate a letterhead with the data I have. What I have is a field that says 1,2,3 and so on with people's name under them, 1 can have 5 names, 2 can have 3 and so on. The letter head I need to make will say something like: Hi [name field], please remember to take care of [1]. my problem is taking the [1] from the database I already have and change it into some form of text, like change [1] into [Throwing out the Trash]. Any help on this would be great, again I basically want to take the value from a field and generate a corresponding test based on the value. Thanks!
efen Posted October 22, 2009 Posted October 22, 2009 pseudo code: Case ( choicefield=1; "throwing out the trash"; choicefield=2; "collecting the trash"; choicefield=3; "generating the trash"; "")
LaRetta Posted October 22, 2009 Posted October 22, 2009 (edited) There are limitations when hard-coding into a calculation. It must be opened any time you wish to add another action or change something and you must view the calculation to remember which action goes with which number. To allow much more flexibility, Smokeyjones, you might consider using a table instead (see attached). The value list table would have an auto-enter serial beginning with 1 and simply a description field. Create a new record and then select your customer and the action (using popup) and the letter itself (generated from merge fields indicated below) will fill in. It's just another approach ... UPDATE: Oh, and if you want to still use calculation, another calc idea can be: Choose (numberField -1 ; "Throwing out the Trash" ; "Emptying the Trash" ; "Generating the trash" ) ... I mention it because I adore Choose() and we don't get many opportunities to use it so perfectly as in this example. ValueListTable.zip Edited October 22, 2009 by Guest Added update
smokeyjones Posted October 23, 2009 Author Posted October 23, 2009 thank you very much for your help!
Recommended Posts
This topic is 5579 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now