Alpha Video Training
Page 3 of 3 FirstFirst 123
Results 61 to 84 of 84

Thread: Invoicing totals

  1. #61
    Member
    Real Name
    Barry Ehrman
    Join Date
    Dec 2005
    Location
    Broolkyn NY
    Posts
    329

    Default Re: Invoicing totals

    I am hereby declaring this post closed. Problem solved. Code moved to Onexit event.

  2. #62
    "Certified" Alphaholic
    Real Name
    Jetson Lilibeth
    Join Date
    Dec 2011
    Posts
    1,093

    Default Re: Invoicing totals

    Quote Originally Posted by Ted Giles View Post
    Have a look around this Barry. Not exactly what you want but it might give you a lead.
    I created this as an example for another Forum user showing calcs on screen.
    Hi Ted,
    I have looked at the sample you posted and i noticed the menu at the left of the the appllication, it came out after i clicked the Launch application, how did you do it/How did you made it?being a beginner, i could not figure out how. Thanks!

  3. #63
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,366

    Default Re: Invoicing totals

    Pull it apart and look at the code behind the buttons.
    Ted Giles
    Example Consulting - UK
    .

    http://ec12.example-software.com//
    See our site for Alpha Support, Conversion and Upgrade.

  4. #64
    "Certified" Alphaholic Ray in Capetown's Avatar
    Real Name
    Ray Hendler
    Join Date
    Jan 2009
    Location
    South Africa
    Posts
    2,036

    Default Re: Invoicing totals

    Control Panel
    Code tab
    Select Toolbar item and click Design at the top.

    We didn't get any further with the concertina style sub-menu on this did we Ted?

  5. #65
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,366

    Default Re: Invoicing totals

    Yeah we did - well Robin did. She posted a superb example.
    (thought you were tied up stocktaking.)
    You getting' anywhere with that?
    Ted Giles
    Example Consulting - UK
    .

    http://ec12.example-software.com//
    See our site for Alpha Support, Conversion and Upgrade.

  6. #66
    Member SNusa's Avatar
    Real Name
    Robert Tupper
    Join Date
    Dec 2007
    Location
    Northeast, USA
    Posts
    893

    Default Re: Invoicing totals

    Quote Originally Posted by Tom Cone Jr View Post
    Barry, I think it's a mistake to mix code as you are doing in post 47.

    First point:
    Xbasic permits your scripts to talk directlly to the table supporting your form. You do this with "tbl.balance", for example.
    Xbasic permits your scripts to talk to the table supporting your form INdirectly through objects in the forum layout itself. You do this with "C_balance.value"
    I think it's a mistake to mix methods in the same script. Use code that talks directly to the table throughout, or use code that talks indirectly throughout.
    Tom,

    I've been processing your suggestion for the past few days. I think I have it figured out....
    Is this analogy correct with regards to your suggestion above?

    If you're setting the index, and you're processing data within a table (via a script), do it this way:

    Code:
    dim tbl as P
    tbl = table.current()
    indx = tbl.index_primary_put()
    But if you're setting the index to work with the form itself, this method would be preferred:

    Code:
    parentform.index_set("invoice_number")
    parentform.find(invnum)
    Thanx in advance....
    Last edited by SNusa; 02-21-2012 at 07:25 PM.
    Robert T. ~ "I enjoy manipulating data... just not my data."
    It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
    RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

  7. #67
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Invoicing totals

    Robert, that's it ! Thanks for the simple illustration.

    -- tom

  8. #68
    Member SNusa's Avatar
    Real Name
    Robert Tupper
    Join Date
    Dec 2007
    Location
    Northeast, USA
    Posts
    893

    Default Re: Invoicing totals

    Quote Originally Posted by Tom Cone Jr View Post
    Robert, that's it ! Thanks for the simple illustration.

    -- tom
    Sweet! So the only question remaining relative to this thread (in my mind at least) is: There must be a set of circumstances where you must resort to "form/table cross-coding."

    ~If so, generally speaking ~ what might these circumstances be?

    Actually, this also raises one more topic of concern: When working with a linked database (non-dbf) are you much safer (generally speaking) with your code "living exclusively within the form?" (relying on form based methods/properties as opposed to table based methods) ~ And what are the implications regarding choosing between ADO / AlphaDAO in this context?

    FYI: For clarification, "form/table cross-coding" (mixing code) was discussed here in post #48.

    PS: I realize this thread has "slipped" off topic, yet this question somehow still seems relevant enough to place here. (I intend to somehow link back to this from another pertinent thread).......
    Last edited by SNusa; 02-23-2012 at 08:31 AM.
    Robert T. ~ "I enjoy manipulating data... just not my data."
    It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
    RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

  9. #69
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Invoicing totals

    Robert, yes, this is far afield. Worse you're asking about topics I know almost nothing about. I suggest you begin anew. -- tom

  10. #70
    Member
    Real Name
    Jeff Markus
    Join Date
    Aug 2008
    Posts
    61

    Default Re: Invoicing totals

    Quote Originally Posted by Stan Mathews View Post
    Correct. That is the advantage of using a posting rule.

    How else would the inv_hedr record know that the inv_detail linked records had changed? You could code the onsave event for the invoice form to recalculate the field rules for the inv_hedr table but that would process all records in the header table.
    the problem here is when the child record is changed/updated the ONSAVE event for the FORM doesn't fire...

  11. #71
    Member
    Real Name
    Jeff Markus
    Join Date
    Aug 2008
    Posts
    61

    Default Re: Invoicing totals

    Quote Originally Posted by barry685 View Post
    I am hereby declaring this post closed. Problem solved. Code moved to Onexit event.
    This means you have to EXIT the invoice each time for the field to update, right?

    wow, I have NO CLUE why these DATABASE companies have NOT made a FIX for ALL this... I have the same problem with Lotus Approach
    Maybe we need a ONANYCHANGE method since the onchange doesn't fire UNLESS you PHYSICALLY type in the field - LOGICAL? NO, as to ME anytime an object CHANGES the CHANGE SHOULD FIRE...

  12. #72
    Member
    Real Name
    Jeff Markus
    Join Date
    Aug 2008
    Posts
    61

    Default Re: Invoicing totals

    I too would like the INVOICE total from the FORM to be STORED in the Invoice Header - tired of all the excuses of WHY would you store this information when it can be calculated.
    I WANT it STORED, updated when the invoice is changed in anyway.

    Still seems I'm working back in the 80's - NONE of these issue have been resolved since then.

    HOW do I take the value FROM a calculated field on a FORM and UPDATE the value in ANOTHER field on the form (hidden or placed behind) the total invoice and get it to UPDATE the invoice header->invTotal
    I've tried the onsave events for details and headers and it just doesn't work, I've been over this with Lotus in the past as well with same STUPID answer of why store it.

    THESE ARE NOT ANSWERS

  13. #73
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,366

    Default Re: Invoicing totals

    Quote Originally Posted by markusof View Post
    I too would like the INVOICE total from the FORM to be STORED in the Invoice Header - tired of all the excuses of WHY would you store this information when it can be calculated.
    I WANT it STORED, updated when the invoice is changed in anyway. Any chance of explaining why? Is it just "because" or do you have a valid processing reason? If you have, please share it so we can understand.

    Still seems I'm working back in the 80's - NONE of these issue have been resolved since then. I think a lot of them have with Referential Integrity and Relational Databases.

    HOW do I take the value FROM a calculated field on a FORM and UPDATE the value in ANOTHER field on the form (hidden or placed behind) the total invoice and get it to UPDATE the invoice header->invTotal
    I've tried the onsave events for details and headers and it just doesn't work, I've been over this with Lotus in the past as well with same STUPID answer of why store it.
    If you want to store this value in the Header, you need to have a calculated field, feeding a Variable, and a field in the Table which picks up the variable when there is a change. I've just done this for fun and I'm no coder but it really is quite simple Jeff.

    THESE ARE NOT ANSWERS. Wind your neck in a bit and you will get help. Upper case sounds like you are shouting. Some contributors ignore any upper case such as yours Jeff.
    Ted Giles
    Example Consulting - UK
    .

    http://ec12.example-software.com//
    See our site for Alpha Support, Conversion and Upgrade.

  14. #74
    Member SNusa's Avatar
    Real Name
    Robert Tupper
    Join Date
    Dec 2007
    Location
    Northeast, USA
    Posts
    893

    Default Re: Invoicing totals

    Code to retrieve calculated field value and place it into a variable/parent form-field object:
    (where vxyTotals is the calculated field)

    I think you could place this code on the canSave event of the form itself.
    (and bind a field on the form to the variable vc_vxyTotals)

    You might even be able to define vc_vxyTotals as a layout variable using V in a5 toolbar.
    (and leave out the first line of code below)

    Form canSave event:
    Code:
    dim shared vc_vxyTotals as N  '(variable to store calculated field)
    vc_vxyTotals = calculated_field_get(local_variables(),"vxyTotals").VALUE_GET()
    'note:  you may also need to refresh the field here via: topparent:<FIELD>.refresh()
    Another option would be to assign a hidden form field object value (which is bound to the header table) to the existing (displayed calculated field object) via it's .value or .text property. (Here again, again, you'll want to refresh form on the canSave event.)

    With a touch of X-basic, (on the desktop side at least), you can do pretty much whatever you want with a5.

    Notes:
    Referential integrity is not generally suggested for multi-user scenarios. ~Due to record locking performance (freezing) possibilities.
    Also, IMHO there's nothing wrong with storing this value in the header so long as it's not editable anywhere else..... Storage is cheap, and sometimes having this info saved in the header makes easier to do other things such as generate reports etc....
    Last edited by SNusa; 03-23-2012 at 01:25 AM.
    Robert T. ~ "I enjoy manipulating data... just not my data."
    It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
    RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

  15. #75
    Member
    Real Name
    Jeff Markus
    Join Date
    Aug 2008
    Posts
    61

    Default Re: Invoicing totals

    Quote Originally Posted by SNusa View Post
    Code to retrieve calculated field value and place it into a variable/parent form-field object:
    (where vxyTotals is the calculated field)

    I think you could place this code on the canSave event of the form itself.
    (and bind a field on the form to the variable vc_vxyTotals)

    You might even be able to define vc_vxyTotals as a layout variable using V in a5 toolbar.
    (and leave out the first line of code below)

    Form canSave event:
    Code:
    dim shared vc_vxyTotals as N  '(variable to store calculated field)
    vc_vxyTotals = calculated_field_get(local_variables(),"vxyTotals").VALUE_GET()
    'note:  you may also need to refresh the field here via: topparent:<FIELD>.refresh()
    This only works if you change something in the FORM after you've entered your details.. which is not how people work.
    I already work with systems that, ah, you have to do this, then that, then this, cause that's the way it's written - I don't put out crap like that..

    It's like when I was working at FORD, ah, pop up an error message in about 3 months so we can fix the program again..

    Thanks for the reply, but it doesn't work anyway you put it, I emailed the guy that started the thread, that gave up and moved onto another product, WHICH I think I'm looking at as well..

  16. #76
    Member
    Real Name
    Jeff Markus
    Join Date
    Aug 2008
    Posts
    61

    Default Re: Invoicing totals

    http://dl.dropbox.com/u/14979559/can...d%20either.swf

    even on the cansave there is a problem if you do not SAVE the record, and skip to prior or next as video shows
    code is behind onflyover as well, as you can see the invoice header invoice total then updates to match the calculated one to the right of it.

    Everything works 90% nothing works 100%

    onchange SHOULD fire when the total field updates END of STORY

    Thanks for trying SNusa

  17. #77
    Member SNusa's Avatar
    Real Name
    Robert Tupper
    Join Date
    Dec 2007
    Location
    Northeast, USA
    Posts
    893

    Default Re: Invoicing totals

    Quote Originally Posted by markusof View Post
    This only works if you change something in the FORM after you've entered your details.. which is not how people work.
    I already work with systems that, ah, you have to do this, then that, then this, cause that's the way it's written - I don't put out crap like that..

    It's like when I was working at FORD, ah, pop up an error message in about 3 months so we can fix the program again..

    Thanks for the reply, but it doesn't work anyway you put it, I emailed the guy that started the thread, that gave up and moved onto another product, WHICH I think I'm looking at as well..
    These won't work because the parent isn't always getting an update when it should:

    What about using an embedded browse "onfetch" event along with topparent.commit()?
    Nope, the problem you have is that nothing happens outside the browse, right?
    (and you have to either hit a save button, or navigate off record to save value...)


    Actually you can do what you want, and this is how to do it:

    Place a button on the embedded browse which shows the value in the underlying table. (instead of a simple record field)
    On the event event of this browse button... add this:

    I just tried it, and it works....... (9 lines of code)
    • Extra code exists to handle cancelling entry when a user hits cancel or exits instead of save
    • ui_get_number() forces numeric data entry and thus validates user input




    USER GETS TO:
    Clicks on the field to edit, (enters the new data and clicks OK) - THAT's IT!
    (And the calculated fields on the form are updated instantly!)

    The solution uses a popup via ui_get_number() which you do have to click OK on with option to cancel/exit instead.
    The field in the embedded browse is actually a hidden button displaying the fields data.
    The custom button when setup properly, looks exactly like it did when it was a field.

    It's still the same amount of clicks (2) since you would first have to click to select the field/row anyways, and then click off the field to commit the new value entered in the field.)


    Code:
    	this.Set_Viewport_row(row) ' this first set_viewport_row line of code is automatically added by a5
    	vc_Value=ui_get_number("QUANTITY:","Sold",this:quantity.text,"")
             ' ----->substitute your embedded browse field column object name for quantity
    
             'vc_Value=ui_get_number("QUANTITY:","Sold",this.quantity.text,"")
             ' ----->  this.quantity also works instead of the :  (but since quantity is too, using : is perferrable??????)
    
    	if vc_value="" then
    		 end
    	end if
    	vn_value=val(vc_value)
    	this:quantity.value = vn_Value
            ' -----> again, substitute your embedded browse field column object name for quantity.
    
    	this.Set_Viewport_row(row) 'which you have to add manually
    
            topparent.refresh() ' should take care of refreshing the parent form so the calculate field displays properly..
            ' (not actually necessary though, as totals were changing with the one button click in child form field that was changed)
            topparent.commit() 'saves the parent table....
    
            'this gets you 95% of the way there.....
            'with a properly setup calculated field based this embedded browse column,
            'everything should work.  (the quantity object in this example)
            'now just add the code here to reset the value of a locked field (parent field) bound to the header table.
     
    
            ' where <objectname> is the name of the embedded browse field.
             'the first this.Set_Viewport_row(row) sets the row
             'the second instance of this.Set_Viewport_row(row) updates the calculated field.
    • Written this way, it works on a numerical field. The button is capturing the numeric value and displaying this value via: str(Invoice_Items->Quantity,20,0,",") ~ You'll have to change 20 depending upon browse field size so user can click anywhere on the hidden button and get results. (use a colored button first to see what is needed) ~ This expression is placed in Button text field on enter button window)
    • You can format differently as you wish depending on what field displaying. Also, if you change to a custom style of button, you can make the button look just like it's a field and not even a button....
    • The above code captures a new value, and immediately updates the row and the calculated field values shown on fields in the parent form!



    I used the AlphaSports invoice quantity field [embedded browse]to try this.
    (using v10.5) ~ I'll import my code into v11 tomorrow just for kicks)
    PS: you might want to explicitly declare (dim) vc_value and vn_value....
    Last edited by SNusa; 03-23-2012 at 05:20 AM.
    Robert T. ~ "I enjoy manipulating data... just not my data."
    It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
    RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

  18. #78
    Member
    Real Name
    Barry Ehrman
    Join Date
    Dec 2005
    Location
    Broolkyn NY
    Posts
    329

    Default Re: Invoicing totals

    Hey Jeff,
    Where in my PM to you did I state that I moved to another product? I wrote that I considered other products, and in my unprofessional opinion I think Alpha is flaky, and perhaps I made a mistake selecting it. However so far I have managed to accomplish what is necessary in my app (with the help of this phenomenal board), and if you check my last post on this subject I did find an answer that worked.

  19. #79
    Member SNusa's Avatar
    Real Name
    Robert Tupper
    Join Date
    Dec 2007
    Location
    Northeast, USA
    Posts
    893

    Default Re: Invoicing totals

    Updated code placed on browse hidden button "event event" (designed to look like a regular data field on browse)
    (Cleaned up to use .value property instead of .text property)

    This methodology enables the browse to update calculated fields.
    Using this "hidden button" to display & edit the browse field "triggers" a refresh of parentform immediately once data is changed.

    Code:
    this.Set_Viewport_row(row)
    vc_Value=ui_get_number("QUANTITY:","Sold",str(this.quantity.value),"")
    ' vc_Value=ui_get_number("QUANTITY:","Sold",this:quantity.text,"")  ' <---- Previous line of code used in post #77 above
    
    if vc_value="" then
    	'this:quantity.value=555 ' works when "hidden button" is clicked to set value.
    	end
    end if
    
    vn_value=val(vc_value)
    this:quantity.value = vn_Value
    this.Set_Viewport_row(row)
    	
    if this.Table_Get().Mode_Get() > 0 then '(kind of optional but doesn't hurt)
    	this.Commit()
    end if
    This works like a charm in v.10.5!
    There is a bug in v.11 though (as usual I found it) ~ See post #83 below with the link to an easy fix.
    (until a5 v11 internal code is fixed)
    Last edited by SNusa; 03-26-2012 at 01:27 AM.
    Robert T. ~ "I enjoy manipulating data... just not my data."
    It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
    RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

  20. #80
    Member
    Real Name
    Jeff Markus
    Join Date
    Aug 2008
    Posts
    61

    Default Re: Invoicing totals

    Quote Originally Posted by barry685 View Post
    Hey Jeff,
    Where in my PM to you did I state that I moved to another product? I wrote that I considered other products, and in my unprofessional opinion I think Alpha is flaky, and perhaps I made a mistake selecting it. However so far I have managed to accomplish what is necessary in my app (with the help of this phenomenal board), and if you check my last post on this subject I did find an answer that worked.
    That is now how I read it, sorry for the misunderstanding..

    I'm just distraught that, this is NO different than Lotus, with the workarounds etc..
    other than my lotus works with my alias tables (doesn't look pretty) but hey at least it works

    I want to be able to click a list of past invoice items (as the customers ALWAYS order the same things, different qty and this is with an alias table of the invoice items) and there is another issue - since I can't get my alias tables to show in a browse, I'm not quite sure how in alpha I will accomplish the pricing, each customer has their own pricing for items, and there is also contracts on some of the items. In lotus I had this all done with alias tables bubbling the contract (if within the invoice date) to be the first record of another (hidden) browse window. When you clicked the past invoice item the pricing actually came from that hidden table (alias) first (if a match) otherwise grabbed the last price of invoice
    so my pricing is
    I don't think I can use alpha as the price book is aliased like 4 times
    1 contract pricing (price book)
    2 price from price book (qty breaks sorted by date of price change)
    2 price from price book (items database sorted by date of price change) keeping a history of all prices for a product
    3 price from invoice line
    4 price from entry

    it can probably be done in a dropdown table of some sort, but don't like the popups of tables - I just want a list off to the right

    now can someone figure out this?
    http://msgboard.alphasoftware.com/al...-working/page2

    I'm reading they are working on SOME BUG as this is still in latest 11 (I think it was along the same lines)

    I hibernating for a while..

  21. #81
    "Certified" Alphaholic Ray in Capetown's Avatar
    Real Name
    Ray Hendler
    Join Date
    Jan 2009
    Location
    South Africa
    Posts
    2,036

    Default Re: Invoicing totals

    Not being too sure what your pricebook contains in both fields and records,
    you can surely have as many re-iterations (aliases) of the pricebook as you describe.
    Each displayed continuously on a form, each for different query purposes-
    by designing the set and the form accordingly.

    Is your reference to "alias join on alphasports invoice - quick n simple - not working" typical of the set you refer to here??

    If Roberts solution is not what you are after, this has gotten too complex to follow. 80 posts, wow.
    How about getting back to basics,
    Provide more detail of this pivotal pricebook or better - sample of the set, form and tables you have , accompanied by a specific question.

  22. #82
    Member SNusa's Avatar
    Real Name
    Robert Tupper
    Join Date
    Dec 2007
    Location
    Northeast, USA
    Posts
    893

    Default Re: Invoicing totals

    Quote Originally Posted by markusof View Post
    .....I'm not quite sure how in alpha I will accomplish the pricing, each customer has their own pricing for items, and there is also contracts on some of the items. In lotus I had this all done with alias tables bubbling the contract (if within the invoice date) to be the first record of another (hidden) browse window. When you clicked the past invoice item the pricing actually came from that hidden table (alias) first (if a match) otherwise grabbed the last price of invoice
    so my pricing is
    I don't think I can use alpha as the price book is aliased like 4 times
    1 contract pricing (price book)
    2 price from price book (qty breaks sorted by date of price change)
    2 price from price book (items database sorted by date of price change) keeping a history of all prices for a product
    3 price from invoice line
    4 price from entry

    it can probably be done in a dropdown table of some sort, but don't like the popups of tables - I just want a list off to the right

    now can someone figure out this?
    http://msgboard.alphasoftware.com/al...-working/page2

    I'm reading they are working on SOME BUG as this is still in latest 11 (I think it was along the same lines)

    I hibernating for a while..
    No pop-ups needed.....
    Use 4 radio buttons with a conditional browse. Change the button, change the browse data shown on form......
    (You'll have 4 one to many relationships set in the invoice header table to accommodate (filter) these four lookup tables.)
    Hint: The embedded browses should each be based on a single table and not a set. (on the many side)
    Add button fields to browse and use event event to store data from "pricing tables" in variables.
    With a few more lines of code you can also automatically add the data and show the info selected into the invoice detail table.
    After setup, 2 clicks. 1 click to select data source, one button click to select billing data. (plus one click to enter quantity sold)
    Robert T. ~ "I enjoy manipulating data... just not my data."
    It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
    RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

  23. #83
    Member SNusa's Avatar
    Real Name
    Robert Tupper
    Join Date
    Dec 2007
    Location
    Northeast, USA
    Posts
    893

    Default Re: Invoicing totals

    WARNING: I found yet another bug that will leave inexperienced users scratching their heads trying to implement my code above in version 11...... (it works fine in v.10.5, but v11 is not doing something it should be.) ~It's an easy fix.
    (the proper "framework" for the browse event event is no longer being generated by a5, and without it, no buttons on an embedded browse will work properly.)

    http://msgboard.alphasoftware.com/al...l=1#post604887
    Robert T. ~ "I enjoy manipulating data... just not my data."
    It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
    RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

  24. #84
    Member SNusa's Avatar
    Real Name
    Robert Tupper
    Join Date
    Dec 2007
    Location
    Northeast, USA
    Posts
    893

    Default Re: Invoicing totals

    Quote Originally Posted by Stan Mathews View Post
    Same case, not.



    In the interactive window, table.current() is maningless. You would use

    tbl = table.open("Inv_hedr")
    tbl.change_begin()
    tbl.subtotal = C_subtotal.value
    tbl.change_end(.T.)
    tbl.close()

    The code I gave you was intended for a form based on a set where inv_hedr is the parent, as I specified, so you don't have to open it. Further the onsave event which only fires immediately before the record is saved, thus obviating the need to put the table in change mode.
    Not necessarily! You can actually specify (set) the IW session from the Interactive Menu heading in a5. Once you select the correct window, table.current() does in fact resolve, and thus has meaning! (Just found this out the other day).....

    And I think I just found another bug too....

    Open a layout. (in run mode)
    Set the correct IW session to this window
    Enter these lines in (one by one) and they resolve/work:
    (the form closes)

    dim vp_form as p = parentform.this
    vp_form.close()

    .....But, if you copy and paste both lines into the IW together in one swoop, and highlight both lines of code and select run [lightening bolt] (to run both lines together) they don't work. ~ parentform.this does not resolve and you get an error.
    Last edited by SNusa; 04-27-2012 at 02:05 AM.
    Robert T. ~ "I enjoy manipulating data... just not my data."
    It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
    RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

Similar Threads

  1. Billing or Invoicing
    By richcanvas in forum Alpha Five Version 7
    Replies: 1
    Last Post: 07-28-2008, 03:14 AM
  2. Best way to do selective invoicing ?
    By robdims in forum Alpha Five Version 8
    Replies: 5
    Last Post: 11-26-2007, 11:28 AM
  3. Automatic Invoicing
    By cadmen in forum Alpha Five Version 6
    Replies: 5
    Last Post: 08-01-2005, 08:52 PM
  4. invoicing
    By Jimmy Davis in forum Alpha Four Version 6 and Prior
    Replies: 2
    Last Post: 07-13-2004, 06:51 AM
  5. invoicing direction
    By Duane Pederson in forum Alpha Five Version 4
    Replies: 8
    Last Post: 04-18-2001, 08:09 AM

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
  •