Jump to content

Change A Value In A Text Field Based On A Passed Parameter

Recommended Posts

Hey everyone! I have what should be a very simple thing, but has been giving me problems for some reason.

I have a set of values that is going to be passed from one data page to another. When they're passed, I wanted a JavaScript that would check to see if any of the parameters are blank (the user put nothing in the box in the previous sheet) and then put a 0 in the associated box.

Here's what I have as an html block above all of the text fields (I was going to make an array and a loop for all of the text fields later)

If ([@parameter_name] === "") {
Document.getElementById("insertRecordtextfield_name").value = "0";

It doesn't respond by putting a zero in the box though, and I can't figure out why! Thanks in advance!!

Link to comment
Share on other sites

On the second datapage, have the field you are checking receive a value of 0 on load. This will force the field to be formatted as a number rather than NULL. Otherwise it won't have the parameter "value" in the html.


edit: I misread your question. Is the second page a form or a report?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...