Jump to content
  • 0

How to present a blank field when there is a value in the table


stephen

Question

The premise of my question is how to present an empty field in a form that has  a value in the table with the outcome to overwrite the value

What I'm trying to achieve...

I have a table (table1) with an "Create/Update" Triggered Action that creates a Change Log record in another table (table2).

Each time table1 is updated. Table 2 creates a new record for each change, capturing the persons name that makes the change as well as the timestamp.

No problems so far.

My problem starts when I present table1 to the users as a updatable webform.  I have a field called "Reason for Change" its a dropdown box. It should be presented to the user as blank in the webform however it display the previous entry. How do I present a blank field in an update form even though it has a value in the table.?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

I would recommend you to include a virtual field which has no connection to the table and then write a script to run on change of this virtual field and get the value and add to the actual field for instance:
 

<script>

document.getElementById('cbParamVirtual1').onchange= function (){

document.getElementById('EditRecordReason').value = document.getElementById('cbParamVirtual1').value;

}

</script>  

EditRecordReason and cbParamVirtual1 should be replaced with the actual ID

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