Jump to content
  • 0

Hidden section on submission form – how to ensure the fields in hidden section still save a value at submission


PeterER8

Question

Hi

Apologies upfront if my questions have been asked before (I could not find the answer). In my defence I am new to Caspio, started testing it last week and now have lots of questions. This one is regarding hidden sections on a submission form and entering data in the fields there.  

So I have created a DataPage that depending on a Dropdown (either morning or afternoon) shows different sections (with the help of rules).

If I select “morning” I get following cells that I need to fill with data from a dropdown ( [   ] signify the data entry cell on the form), the remaining fields remain hidden:

09:00 Result   [   ]

10:00 Result   [   ]   

11:00 Result   [   ]   

12:00 Result   [   ]   

 

If I select “afternoon” I get following cells that I need to fill with data from a dropdown ( [   ] signify the data entry cell on the form), now the "morning" cells are hidden:

15:00 Result   [   ]

16:00 Result   [   ]   

17:00 Result   [   ]   

18:00 Result   [   ]   

 

The table behind is as follows

Table: Shift, Result09, Result10, Result11, Result12, Result15, Result16, Result17, Result18

 

The way this is setup is that automatic value in the Result fields will always be 0 at the start. However, the hidden section ends up empty at submission. When I then look in the corresponding table I get the following result:

 Table: Shift, Result09, Result10, Result11, Result12, Result15, Result16, Result17, Result18

Values: morning,0,10,11,0, , , , ,

 

The values of the fields that were hidden on the datapage are null/empty

And the opposite happens if I select afternoon.

Is there a way to fill these fields with the basic "0" rather than null  if the section is hidden?

Or, is there a way to use the same fields in both sections but with different data Labels (which also would reduce the number of fields).

I really appreciate any help you can give me!!!

 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Hi @PeterER8,

If you wanted to use only 4 fields instead of 8, then you can try this workflow as well. You may follow the steps below.

1. In your submission form, add your 5 original fields and 8 Virtual Fields, then separate them into 4 sections. The Virtual Fields will serve as your input fields here and the rules are still applied here to hide the section based on the shift you will choose.

image.png.20f19de0fdd44accda36ee856bfcb3f8.png

2. Your 4 original fields will be under Section 4. Each of them will be set as Calculated Value with the formula below. I used CASE WHEN statement to get the value from the Virtual Field. If the Morning shift was chosen then it will get the value from Virtual1 and vice versa. Each field has the same formula and you will just change the Virtual Field names. So for the next field, the Virtual Fields will be 2 and 6, and the same way applies to the 2 remaining fields.

image.png.1bf0cefd791f0135c0fa6bab545dd772.png

3. To hide the original fields on the DataPage, you may just refer to this HowTo article.

image.png.2a501bc523f28e4a2e57c3b7b104f08c.png

4. Here are the sample results from the table upon the submission using this form.

image.png.2fba4c4813228db558be925232f1f7b6.png

 

I hope this helps! :D

Link to comment
Share on other sites

  • 0

Devils advocate side.  Those are some good solutions to the problem, but super complex.  Especially if you have a lot of these type fields!  Better solution, Capsio program it not to do that.  "Hide" the field on the data page should not mean "Omit/delete" any default data values from the entry/target table.  Am I missing something here?  They should rename Hide field to Hide field/Omit Data.

Feel free to vote to make this not happen:  https://caspio.uservoice.com/forums/164206-caspio-bridge/suggestions/44905339-prevent-a-hide-field-rule-from-actually-omitting-t

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