How to store multiple values from check box

How to store multiple values from check box

  

Hi ,

I would like to store multiple values from a check box in my form.

How would i achieve this and what would be the table structure.

Thanks 

Ankit


Hi Ankit,

I would suggest to create a table with a couple of Boolean fields. One field for each checkbox. Assign each field to one checkbox and on save, all the fields will be stored in the database.

Let me know if you need more explanation.

Kind regards,

Remco

Remco Dekkinga wrote:

Hi Ankit,

I would suggest to create a table with a couple of Boolean fields. One field for each checkbox. Assign each field to one checkbox and on save, all the fields will be stored in the database.

Let me know if you need more explanation.

Kind regards,

Remco

Hi Remco,

Thanks a lot for your reply.

It helped me to achieve my result.

One more question , i would like to upload a document in the form but its size shouldn't exceed 3 MB.

Also how would i remove "no file chosen" section from the upload widget ?

 

Thanks 

Ankit


Solution

Hi Ankit,

You can change the layout of the upload widget by using css. There are lots of examples on the Internet for this.

To restrict the file size there are two options. 

1. After upload and before saving to the database you can check the file size and throw an exception. This is the basic Outsystems solution.

2. Use JavaScript to check the file size before uploading. You do need a browser that supports this JavaScript, because you are checking the local filesystem of the client.

One last note regarding the forum: if your question is answered, mark the thread as answered and post a new question  to start a new thread. This will keep the forum  clean and other developers looking for the same question have more luck in finding their answer.

Kind regards,

Remco

Solution