Jump to content
  • 0

Default value for editable cell in Grid Edit view


gsgriffin

Question

I would like to have Grid Edit by default view with a default value in one cell for each row added (and not user editable).  Each row edited and added to the Grid Edit needs to have this common value for the table relationship.  Before I waste a lot of time trying to reverse engineer what they are doing dynamically when each row is being edited, would be nice to know if there is already a known way to do this.  Grid Edit is a great feature, but to not be able to enter a default value in either the configuration or the actual fields really reduces this overall functionality and forces the user to enter all values, unless I am missing something....like posting the value from the placeholder.

This is easy to do when NOT in Grid Edit, but the dynamic nature of taking a value and setting it somewhere hidden 

This is not a display challenge.  The default value needs to be for a field in the row that is to be saved with the row....the editable cells, not a viewing cell with a calculated value, unless the calculation can be saved in a field for the table when the row is edited.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
55 minutes ago, Alison said:

Hi @gsgriffin,

Please follow this forum post to have a Grid Edit by default: 


And to have a default value in one cell, you can make one field hidden with the default value and use HTML block or Calculated field to display this value. Please see these screenshots for better understanding:
https://prnt.sc/mklf8f
https://prnt.sc/mklfhd

 

Link to comment
Share on other sites

  • 0

The desire is to have one of the editable cells (a cell that is storing a value in the table upon edit of the row) have a default value.  When you add a new row, none of the cells that are editable can have a default value.  I've figured out pretty easily how to do this when NOT in Grid Edit, but in Grid Edit mode, there is a dynamic change to each row when entered and then a storing of the values that appears to be AJAX.  I need to be able to have a default cell value that is stored to the table when a new row is being edited or created. 

Link to comment
Share on other sites

  • 0
1 hour ago, Alison said:

Hi @gsgriffin,

Have you tried to create one field and make it hidden with the default value and use HTML block or Calculated field to display this value?

Alison, This is not a problem with displaying a value.  It is a challenge in trying to enter a default value in the saveable fields that will post to the table.  Try this so you understand what I am asking:

1) Create a small table with a couple fields.  Enter data, if you like.  Make the first field in the table called, "AID" as an example.  This is NOT a field to be generated automatically (autonumber).  This is a number that will connect the relationship with a different table.

2) Create a datapage tabular report and make sure it is given the ability to GRID EDIT and the ability to INLINE EDIT and ADD RECORDS.

Run the report and enter grid edit mode.  Now, what I need, is to pass along an external value for the AID in the filter for the report results.  No problem, Easy.

Now, in the display, all of the rows will only show for rows with matching AID.  I want everything new entered while looking at the report should also always have the same AID.  That is fine on the inline edit mode.  I've scripted for that.  It can make sure the AID cell is automatically populated with an insert.  I can also script for that to ensure it stays the same AID.

Now, enter GRID EDIT mode while looking at the report.  Looking at the source code, when you enter a row or leave a row, the DOM is dynamically modified, hidden cells are created and taken away, and I'm assuming AJAX is submitted the data for each cell after you leave it (internal API?).  So, in Grid Edit mode, I'm wondering if there is already a function that Caspio provides that would allow for a row to have a fixed value for a field in the table.  It could be hidden (actually best if it is).  The user doesn't know the AID and doesn't need to even see it, but I don't know and can't easily tell if there is a way to force that value WHILE IN GRID EDIT MODE.

The Grid Edit is a nice tool for the end user, but since I can supply the table relationship connecting value for them automatically, I can't use grid edit and have to use the clunky standard report with edit, delete and empty fields for adding.

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