bigtoe
Posts: 115
|
Posted: 07/05/2004, 12:06 AM |
|
I converted a text field "status" to a label.
I used DLookup to do a database lookup and put value "closed" in "status".
Now when the "Add" button is clicked on the form, all the other fields are saved to the database.
But the value "closed" is not saved in the "status" column in the database.
Instead the value "NULL" appears in the "status" column.
How can I force this label data to be saved along with the rest of the fields?
|
|
|
Last Hero
|
Posted: 07/05/2004, 12:25 AM |
|
Only Editable Components(textbox, listbox,....) can be saved.
You can use hidden component in you case.
|
|
|
bigtoe
Posts: 115
|
Posted: 07/05/2004, 12:40 AM |
|
But a hidden component is not visible.
I wanted it to be visible that is why I made it a label.
How do I save a read-only visible value?
|
|
|
klwillis
Posts: 428
|
Posted: 07/05/2004, 9:58 AM |
|
Create a hidden edit control called "HiddenStatus".
Place the value "closed" in "HiddenStatus" like you
do within the label status field.
That should do it.
_________________
Kevin Willis, VP/CIO
HealthCare Information Technology Specialist
http://www.nexushealthcare.com
"Fast - Convenient - Quality-Care"
Medical Software Consulting Services
Email : klwillis@nexushealthcare.com
Skype : klwillis2006 |
|
|
bigtoe
Posts: 115
|
Posted: 07/05/2004, 9:05 PM |
|
I created the hidden field.
The value "closed" is now saved in the "status" column.
So I suppose to save a read-only visible value, I have to keep
the same value in 2 different components:
one - Hidden for saving
two - Label for displaying
And then make sure that both are updated at the same time to
ensure the accuracy of the data in the system and perception
to the user.
Correct?
|
|
|
klwillis
Posts: 428
|
Posted: 07/05/2004, 9:44 PM |
|
Exactly.
_________________
Kevin Willis, VP/CIO
HealthCare Information Technology Specialist
http://www.nexushealthcare.com
"Fast - Convenient - Quality-Care"
Medical Software Consulting Services
Email : klwillis@nexushealthcare.com
Skype : klwillis2006 |
|
|
bigtoe
Posts: 115
|
Posted: 07/05/2004, 9:52 PM |
|
Ok. I will do this from now on.
Hmm.
There could be an easier way to do this.
I mean, CCS generated the whole form page for me.
That saved me a lot of time.
Something this basic incorporated into the CCS application
would certainly add to the time savings.
|
|
|
peterr
Posts: 5971
|
Posted: 07/06/2004, 1:14 AM |
|
We don't know how to incorporate this in CCS. The HTML form simply doesn't submit labels and there is nothing that can be retrieved. It may seem basic but this is how HTML works. Unfortunately we cannot assume that every time someone adds a label they want a hidden field as well.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|