Jump to content
  • 0

Repeated field on one form


SeymourBots

Question

I am designing a database for stocktake and tracking of human tissue grafts. Elements that we need to trace are encoded as the serial number for each unit as a barcode, including the donor number, size of the graft, type of graft and the piece number (number of each sized piece cut from one donated tissue). I have chosen to use Caspio because it has been the only platform that I have been able to program to split the information encoded in each barcode into attribute columns (donor, size, type, piece). My problem now is how to create a form into which I can scan each serial numbered unit. So far, I have a form that receives the scanned barcode, which enters the barcode into the Serial_Number column of my table, from which each attribute is split into columns using formulas (Figure 1). In one 'session' of scanning grafts into the database, there will be approximately 30 pieces, each with a unique serial number that needs to be scanned in. Currently I have one Serial_Number field in one form (Figure 2). I would like multiple of the same field for scanning in each graft in a session. How do I do this?

BarcodeAttribute Form.png

BarcodeAttributes Table.png

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

SeymourBots, I am not sure that this solution is exactly what you are looking for, but if you are going to embed your Caspio datapages into webpages elsewhere (e.g. using site builders like Wordpress), you could embed the submission form several times into the webpage. To get rid of repeating Submit buttons, you can use the approach from this topic:
https://forums.caspio.com/topic/8044-submit-two-datapages-with-one-button/

By following these steps you will hide the repeating buttons and create a custom one to submit all the forms with one click. Here's the revised code for responsive datapages:

To add to the Footer of the datapage:

<script type="text/javascript">
document.addEventListener('DataPageReady', function () {
  document.querySelectorAll('div[class^="cbSubmitButtonContainer"').forEach(function(i) {
    i.style.display = "none";
  });
});
</script>

To add to the webpage where you ember the Submission Form:

<button id="submitAll">Submit</button>

<script>
    document.getElementById('submitAll').addEventListener('click', function() {
        var arr = Array.from(document.querySelectorAll('input[class^="cbSubmitButton"]'))
        arr.forEach(function(elem){
            console.log(elem);
            elem.click();
        });
    });
</script>

 

At least, you could give it a try :)

Link to comment
Share on other sites

  • 0
On 3/26/2021 at 6:10 PM, PotatoMato said:

Hi @SeymourBots, just to clarify, are you using a barcode scanner to input the value on the Serial Number field, then separate the scanned value on the table?

Hi @PotatoMato. Yes, we use a barcode scanner. I'm not sure what you mean by "separate the value on the table". Currently the field only accepts one value. I would like to repeat the field rather than have multiple values in one field (e.g. separated by commas, or new lines) as ensuring all fields are filled is more user friendly than counting the lines or comma separated entries. Also multiple entries in one field may cause other issues. Each entry for each field would produce a new line in the table (Figure 1.). thank you for your reply.

Link to comment
Share on other sites

  • 0

Hi there! Have you already considered using List Data Type in your table for this workflow? If not, I suggest check this HowTo article to see if this can help with your workflow:

https://howto.caspio.com/tables-and-views/data-types/list/

But if you are not going to use List Data Type fields in your table design, another way that I can think of is to add another field with the same data type as the first one just in case you need to input more than 1 serial number.

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.

Guest
Answer this question...

×   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.

Loading...
×
×
  • Create New...