sending data from checkbox form to next page as string - forms

I have a list of names that you can tick box to select favourites and then submit the form and it goes to next page to display the short-list.
I need the selected names to send through as .asp?T=Name&Name&Name then only show those artists by using
`strType = Request.QueryString("T")`
with the query
WHEREActNamelike '%"&strtype&"%'
is this possible
The names are originally pulled from a database so generated in loop
how do i do this please?
Thankyou
Michelle

Do not use the & Symbol to separate characters in a querystring. The & symbol is defined as a type of reserved character in urls (See Here http://www.456bereastreet.com/archive/201008/what_characters_are_allowed_unencoded_in_query_strings/).
I would recommend using an underscore as your seperator between values and then using the VBScript Split function to achieve the result you want. See Here for more info on Split: http://www.w3schools.com/vbscript/func_split.asp

Related

Docvariable with empty string value

In word, I'm using docvariables to manage pluralization.
A VBA macro is changing the value of several docvariables to pluralize / singularize them.
But sometimes I want to use a Docvariable only for enable/disable a 's' suffix.
Problem: I cannot set it to empty string, because it deletes the docvariable.
The field displays an error in word.
So I'm searching a way to achieve this, it could be :
A way to keep a Docvariable existing, with empty string or equivalent value
A field formula which make this job if the variable doesn't exist
Any other workaround would be appreciated.
Thank you
A Document Variable (used in DocVariable field codes) cannot exist if it has no content.
A possibility would be to also store the space in this DocVariable so that it display s[space] or just [space].
Otherwise you may need to write this information to a Bookmark (possibly using a Set field) and display the content using a Ref field.

Protractor paste list of numbers into text field

I am currently trying to use protractor to upload multiple numbers eg, 23245, 23343, 34324 into a text field these numbers can be copied out of a excel spread sheet id column and pasted into the text field on the application. The application will then add the ids onto a table. Each id will have a new row. Does anyone know if this can be done. Currently I am only sending one number into the text field. But the text field can also receive multiple numbers...
I don't fully understand the question, could you provide more context? What are multicity numbers?
If I were to send multiple numbers to a text field, I would probably:
<element>.sendKeys("1 \n 2 \n 3 \n 4 \n");
Or something similar. Please provide more information about the question so I/we can help better.
N
NOTE: I ORIGINALLY HAD THE SLASHES THE WRONG WAY, IVE EDITED THE ABOVE SNIPPET TO NOW BE CORRECT, MY BAD!

Word/Publisher email merge issues

I've been searching for days for an answer to this issue. I'm trying to append an Access field to a base URL to customize each email in my merge like so: http://www.example.com/myItems.asp?ItemID={field}.
I tried several approaches in Word 2007, then gave up and finally tried Publisher after coming across this post - MS Word: Mailmerge hyperlinks with query get URL string with a MERGEFIELD.
In Publisher, I got everything to merge properly including the custom links (according to preview), but when I hit "send email" it wasn't passing the emails to Outlook - said 0 message(s) sent. I tried again, using a blank email template and got it to pass the email, but the email showed field names rather than the merged data.
Coming across this article regarding the field names - http://msgroups.net/microsoft.public.publisher/emailmerge-not-working-in-publishe/213664 - I clicked outside the text box as suggested before sending email but still, the field names show and not the merged data.
I'm super frustrated and exhausted. This shouldn't be this difficult! Any ideas or suggestions would be appreciated.
This shouldn't be this difficult!
I agree. I can't help on the Publisher front, but this link should help for Windows Word.
To summarise, when you insert the HYPERLINK field, do it this way:
Use ctrl-F9 to insert a field code brace pair { }
Type HYPERLINK between the braces
Select the field and update it once (F9)
Do not update this field code again. If you do, Word will always insert the same link text (i.e. the hyperlink target). People working with fields often select F9 quite a lot just to make sure things are up to date, so you have to try not to do that.
If you Alt-F9, you should see that the display text is an error message (starting with "E" in the ENglish language version of Word).
Move the insertion point so it is immediately after the E. Type the display text that you want, or, if you want a variable display text built from text + MERGE fields etc, enter that text and those codes).
Carefully remove the "E" and the other part of the error text.
Use ALt-F9 again to display the HYPERLINK field code. Click after the K, type a space, then enter the following fields and text, assuming your variable text is coming from a MERGE field called fieldname:
"{ SET X 1 }http://www.example.com/myitems.asp?ItemID={ MERGEFIELD fieldname }"
(The SET field is there to stop Word doing something else wrong. If you have more than one HYPERLINK field, you will need to SET a different variable name (X1, X2 etc.) in each HYPERLINK). This is discussed in more detail here - interestingly enough, that question was also about merge to HTML email, but I think you also have to do the additional stuff I mention above to make it all work.

number representing text string

A web form collects data on students in a band organization at school. The form data is fed into a google sheet that then populates a merge template and the merged forms are emailed to the recipient. A parent needs to print, sign and turn in the forms. There are hundreds of kids in this band and at registration time when the forms are turned in it is easier to sort all the papers in the stack if you have a short sort number in the corner... Volunteer kids don't apply alphabetization well. I'm trying to create a formula that will give me that sorting number to merge onto the header of each page of the PDF they receive after submitting the form. I want it based on last name and then first name and be able to create that number (in the google sheet) on the fly because the merging happens almost instantly when the user submits the form. Hence, an excel type formula is desired that will result in a number representing the kids name. I'd like for each number to be unique but some names are the same for the first few letters, also some names are only 2 characters long. I tried making A=10, B=11, z=35 etc. (so all are 2 digits) So, using only the first 3 characters, Bob Jones would = 192423112411 - hardly easy to sort the paper at a glance and it doesn't really differentiate between Bob Janes either. 4 digits is preferable. I also looked at =code() formula and it came out with long numbers too. Any advice is appreciated. Thanks!
Side note: What method do spreadsheets use to sort text? Do they weight the characters or what? Before I got the automerge thing to work I assigned each kid in the list a number higher than the one below and lower than above (on the sheet), then did the merge.
One option is to:
sort the name list alphabetically
add a sort number column, and put a =TEXT(row(),"0000") formula to generate a unique ID
on the merge spreadsheet, use a VLOOKUP function to retrieve the unique ID for that specific name.
First off, that wall of text was kind of hard to read through. Please try and do a little formatting so the people trying to help you can easily follow what you're trying to convey.
Personally I would suggest a hyphenated system. First initial of last name converted to a number, followed by a hyphen, followed by the first two letters of their first name converted to numbers.
Bob Jones becomes 11-1956 assuming you differentiate between upper and lower case, or 11-1924 if you convert everything to upper case, which I guess makes more sense.
You could use this VBA function to convert names to a system like that:
Function ConvertToIndex(strInput As String) As String
Dim strLast As String
Dim arrName() As String
Dim strFirst1 As String
Dim strFirst2 As String
arrName = Split(strInput, " ")
strLast = Mid(arrName(1), 1, 1)
strFirst1 = Mid(arrName(0), 1, 1)
strFirst2 = Mid(arrName(0), 2, 1)
ConvertToIndex = Asc(UCase(strLast)) - 55 & "-" & Asc(UCase(strFirst1)) - 55 & Asc(UCase(strFirst2)) - 55
'MsgBox ConvertToIndex
End Function
Thank you Tim, Nutsch and Mad Tech for your responses. I appreciate your input. Sorry the paragraph was so long, I get wordy. Because the members get their merged PDF sheet immediately after submitting I need the number to be based on the name as soon as it's entered, not after the fact; so I was looking for a formula that would reside in the sheet. Interesting VBA function too though. I'll settle for numbering them afterwards, maybe when the sheets are turned in. By then I'll know all who are in the band and can assign numbers like before. Thanks again!

getting post variables in asp with non-alphanumeric fieldnames

I am working with a legacy form builder system that can have non-alphanumeric fieldnames
so for example
< input type=text name="5-Teléfono">
and in asp, simply doing the following will not output the posted value
response.write (request('5-Teléfono'))
I understand this isn't the best design decision (should probably name the fields text_123 ... etc), however updating the whole system to use this structure would take time.
Is there a way in asp for me to read form field names with non-alphanumerics ?
Try
response.write (request("5-Teléfono"))
(ie with double quotes around 5-Teléfono)
Single quotes in vbscript are used to comment out what comes afterwards
Don't use such names, it's like using non English variable names - same impact.
If you can't change the name, you can still iterate the posted values and look for the proper one:
For Each key In Request.Form
If (InStr(key, "fono") > 0) And (InStr(key, "5-Tel") > 0) Then
Response.Write("Found, value is: " & Request.Form(key))
End If
Next