• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFGRID changes 2017 date to 2000 on save

New Here ,
May 19, 2017 May 19, 2017

Copy link to clipboard

Copied

We're using ColdFusion 2016 Update 4

This problem was just brought to my attention by a user who probably has not used her application since Update 4 was applied.

The application worked fine until reported to me on 5/19/17 our update was applied on 4 /25/17.

I've attached screenshots at the bottom of this post.

The workflow is the user enters a new event hits save - that's it

But now after the first save she has to go to edit mode and change the 00 to 17 and save again.

The change sticks after the edit, but we need to find a fix for this.

here is the code:

        <cfform class="EMwrapper" name="MainForm" format="html">
            <cfgrid name="gridEM"
                    query="EM"
                    format="html"
                    selectmode="edit"
                    enabled="yes"
                    insert="yes"
      delete="yes"
                    height="400"
                    autowidth="yes">
 
  <cfgridcolumn name="ID">
  <cfgridcolumn name="EventNum">
  <cfgridcolumn name="EventTitle">
  <cfgridcolumn name="EventDate" mask="m/d/y" type="Date">
  <cfgridcolumn name="EventLocation">
  <cfgridcolumn name="CountyCode">
  <cfgridcolumn name="Hours">
  <cfgridcolumn name="HealthRelated">

            </cfgrid>
           
            <cfinput type="submit" name="SaveChanges" value="Save Changes">
        </cfform>

Views

634

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
May 19, 2017 May 19, 2017

Copy link to clipboard

Copied

If this is something that was working fine but stopped after an update I would submit a bug to Adobe - https://tracker.adobe.com/ 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 19, 2017 May 19, 2017

Copy link to clipboard

Copied

What is the difference in code between the original save and the edit save?

There may be a bug, as haxtbh​ has suggested.  But it could also be something easily missed in code review.

V/r,

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 20, 2017 May 20, 2017

Copy link to clipboard

Copied

LATEST

I'm not so sure about what you mean by 'save'. Is using the submit button to save the grid a documented feature in ColdFusion? I suspect not. If indeed not, then any results you obtained with it were just accidental.

Some things we know for sure. A submit action brings you back to the form page. However, you are dealing with 2 different page contexts.

After the submit button is clicked, the form page currently before you is the action page. It has a different context from the submitting page, which is now the referrer. The cfform tag has an attribute, preservedata, to maintain field values after submission. Alas, the documentation says that this doesn't apply to grids.

I have always thought the action to save records after an update in cfgrid is to "press the ENTER key on the keyboard". Look it up.

If that is so, then you might want to try something like

    <cfinput type="button" name="SaveChanges" value="Save Changes" onclick="return String.fromCharCode(13);">

Here, onclick="return String.fromCharCode(13);" is my attempt to model "press the ENTER key on the keyboard". It might be wrong. Just an idea to point the direction.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation