Alpha Video Training
Results 1 to 4 of 4

Thread: how to post back values - field rules

  1. #1
    Member
    Real Name
    Francis Dizon
    Join Date
    Jan 2006
    Location
    Philippines
    Posts
    404

    Default how to post back values - field rules

    hi all,

    i have an invoicing system with a void button...

    Code:
    topparent:void.value = .t.
    topparent.Commit()
    topparent.Close()

    my void button voids the invoice but the problem is, the values in qty field does not post back to products table onhand field. how to delete the items on a "use named browse layout" so it can post back the values? preferred solution should be included the void button codes.

    any thoughts will be highly appreciated.

    tia
    Francis

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: how to post back values - field rules

    how to delete the items on a "use named browse layout" so it can post back the values?
    You probably need to set the values in the qty field to the negative of the current values first, assuming you are posting by subtraction to the products table. Then void the invoice.

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

    Default Re: how to post back values - field rules

    Francis, I'm not following the script you posted. It seems to set the value property of an object named "void" to a logical true, then commits the record. Unless I'm missing something here I see nothing that would trigger the post field rule to fire. Is there another script somewhere that deletes the record or zeros out the quantity from the current transaction? I'm not seeing the whole picture. What am I missing?

  4. #4
    Member
    Real Name
    Francis Dizon
    Join Date
    Jan 2006
    Location
    Philippines
    Posts
    404

    Default Re: how to post back values - field rules

    tom you are right. i just toggle the logical field "void" bec i still want to see the voided transactions. and therefore, no record is deleted.

    i have an idea but i dont know if its the best practice or best way to have the voided transaction saved before its deleted. what i have in mind is dump the report to pdf file or is it better to dump the records to a temp table for admin viewing purpose?

    what i have implemented is dumping the report to file but i was thinking if lots of transactions have been voided, the admin who wish to view the voided reports will end up viewing them one by one.

    Code:
    topparent:void.value = .t.
    topparent:paid.value = .t.
    topparent.Commit()
    
    'dump the report to archive sub folder of the app in pdf format
    record_number = current_record_number()
    query.filter = "recno() = " + record_number
    query.order = ""
    :Report.Archive("Invoice",query.filter,query.order)
    
    'delete item details code goes here
    
    'close the form
    topparent.Close()
    will try to figure out how to delete the records on details table so the posting rules will be triggered.

    any help with this will be highly appreciated...

    TIA
    Francis

Similar Threads

  1. Edit list in previous values of field rules?
    By John Harrison in forum Alpha Five Version 7
    Replies: 2
    Last Post: 05-17-2006, 11:15 AM
  2. back up field rules
    By Mattyau in forum Alpha Five Version 5
    Replies: 8
    Last Post: 11-28-2004, 01:12 PM
  3. how to set transaction field with field rules post
    By Dale Hartshorn in forum Alpha Four Version 6 and Prior
    Replies: 0
    Last Post: 08-10-2000, 08:40 AM
  4. Field Rules - Post operations
    By DORaymond in forum Alpha Five Version 4
    Replies: 0
    Last Post: 08-08-2000, 07:57 AM
  5. Display unique values in lookup field rules?
    By Bill Warner in forum Alpha Five Version 4
    Replies: 1
    Last Post: 04-19-2000, 08:10 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
  •