Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

How to create a field to enter information?

Post Reply
ruiascensao
Posts: 177
Joined: Tue Nov 15, 2011 2:24 pm

How to create a field to enter information?

Unread post by ruiascensao »

Hello,

I have create a small database to store Jobs Numbers. I have to use a code bar scanner. The idea is to have a field that accepts the value from the scanner, cute this jobs number to the next record available. This way Ican enter all job numbers in a fast way and then fiel the other fieds if i need.

Can anyone help me with this?

Thanks in adance.

Regards,
Rui
You do not have the required permissions to view the files attached to this post.
BR
Rui
ruiascensao
Posts: 177
Joined: Tue Nov 15, 2011 2:24 pm

Re: How to create a field to enter information?

Unread post by ruiascensao »

Hi!!

Any sugestions on this??

Regards,
Rui
BR
Rui
zazzium
Posts: 84
Joined: Mon Jul 04, 2011 12:52 am

Re: How to create a field to enter information?

Unread post by zazzium »

I suggest, you call a JavaScript function after 'jobs' field is changed that loops through subform 'Jobe code' fields
..and if it's empty give te subform field the 'jobs' value and clear the 'jobs' field...

..be sure to check out http://wiki.nubuilder.com and the tutorial videos.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: How to create a field to enter information?

Unread post by admin »

Rui,

This might help.

(put fillNextBlank(this.value) on the onchange event of the field taking the barcode)

Code: Select all




function fillNextBlank(pValue){

   subformName  = 'my_subform';
   columnName   = 'my_field';

   itemArray  = nuSubformRowArray(subformName);

   for(var i = 0 ; i < itemArray.length ; i ++){
   
      var bCode = document.getElementById(itemArray[i] + columnName);
      if(bCode.value == ''){  //-- go to first blank item (row)
         bCode.value = pValue;
         return;
      }
   }
   alert("Add more blank rows..");


}

ruiascensao
Posts: 177
Joined: Tue Nov 15, 2011 2:24 pm

Re: How to create a field to enter information?

Unread post by ruiascensao »

Hello,

The delete check box is checked after this process. How can I uncheck?

Regards,
Rui
BR
Rui
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: How to create a field to enter information?

Unread post by admin »

put

Code: Select all

         document.getElementById('row' + itemArray[i]).checked = false;
just above

Code: Select all

return;
Steven
Post Reply