Alpha Video Training
Results 1 to 2 of 2

Thread: Set dialog to dirty issue (not just make the submit button active)

  1. #1
    Member -Jinx-'s Avatar
    Real Name
    Jinx
    Join Date
    Jul 2012
    Location
    Wisconsin
    Posts
    963

    Default Set dialog to dirty issue (not just make the submit button active)

    I've made a "copy record" button on my dialog. It works fine with the {dialog.object}.populate method. Unfortunately this doesn't set my fields to dirty, particularly in repeating sections so none of that data gets submitted when hitting the button. I have to physically dirty all of the rows so that it will save the data. I've tried to use the .setValue method but I don't think it accepts the array of data that I need to pump in to my copied dialog. I've tried messing with e.dirtyColumns but it doesn't seem to work the way I expected. I should say, I'm not sure how to use it. Can I feed it a 'P' type variable and add it to the end of the below javaScript command?

    Here's an example of the javaScript command that my xBasic function pukes out:
    Code:
    {Dialog.Object}.newRecord();setTimeout(function(){{dialog.object}._setRepeatingSectionRowCount('CONTAINER_2',7,true,true);{dialog.object}._setRepeatingSectionRowCount('CONTAINER_1',4,true,true);{dialog.object}.populate({
    	MACHNO: 686,
    	PARTNO: '2630-AB-155',
    	DWGNO: '2630-AB-155',
    	STATUS: 'NEW',
    	MACHTYPE: 'HTC',
    	NUMPARTS: 1,
    	OPNO: '1',
    	LAYOUTREV: 0,
    	MAINPRGNO: 259,
    	NOTES: 'TEST',
    	LAYOUTORD_A5INSTANCE1: 3,
    	POSITION_A5INSTANCE1: 'JAW',
    	DETAILSEQUENCE_A5INSTANCE1: 1,
    	TOOL_A5INSTANCE1: 'WS',
    	TOOLINFO_A5INSTANCE1: '',
    	DETAILNOTES_A5INSTANCE1: 'Bonnet Bore',
    	LAYOUTORD_A5INSTANCE2: 4,
    	POSITION_A5INSTANCE2: '1',
    	DETAILSEQUENCE_A5INSTANCE2: 1,
    	TOOL_A5INSTANCE2: 'TH-372C',
    	TOOLINFO_A5INSTANCE2: '',
    	DETAILNOTES_A5INSTANCE2: 'TGTR 25.4-2',
    	LAYOUTORD_A5INSTANCE3: 5,
    	POSITION_A5INSTANCE3: '1',
    	DETAILSEQUENCE_A5INSTANCE3: 2	
    },1,true);},1000);
    If I try the setValue method instead of the populate method it gives me a "object or method does not support ToUpperCase" and I have no clue where that is comming from. Like I said, my data format is probably ok going into the populate method but the setValue method wants something else.

    Any help would be appreciated.

    Thanks

  2. #2
    Member -Jinx-'s Avatar
    Real Name
    Jinx
    Join Date
    Jul 2012
    Location
    Wisconsin
    Posts
    963

    Default Re: Set dialog to dirty issue (not just make the submit button active)

    I guess no one knows, so it's lucky that I found an answer buried deep within alpha. There were some notes if you picked "function prototype" on the ajax callback action. Inside the pages of notes I found a few lines that had my answer in them.
    Code:
    'var flagSetDialogClean = false;
    'var flagFireChangeEvents = true;
    '{dialog.object}.populate(_d,1,flagSetDialogClean,flagFireChangeEvents);
    '{dialog.object}.refreshClientSideComputations();
    This was the only place where I could find it mentioned what the flags at the end of the populate method where. I set it to 1,false,true); from ,1,true); and iit fixed my issue.

Similar Threads

  1. Set up active tab in tabbed control issue
    By draganksg in forum Alpha Five Version 11 - Desktop Applications
    Replies: 8
    Last Post: 10-24-2012, 06:20 AM
  2. Custom Field Needs to be Dirty for Submit to be active?
    By mstricky in forum Application Server Version 11 - Web/Browser Applications
    Replies: 5
    Last Post: 05-10-2012, 06:07 PM
  3. dialog button to show when form is dirty
    By Ken Tjia in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 01-07-2012, 04:05 AM
  4. Prefilled grid all fields hidden want it dirty so submit button is ready.
    By NicholasWieland in forum Application Server Version 10 - Web/Browser Applications
    Replies: 5
    Last Post: 09-28-2010, 03:41 PM
  5. Custom "submit" button - how to dim it when not dirty
    By Scholin in forum Application Server Version 10 - Web/Browser Applications
    Replies: 7
    Last Post: 03-03-2010, 07:29 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •