Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 13 NOV 2002 08:28:10AM Andrew Roberts wrote:

I have a database bound form in which I have a 3 column edittable, 2 columns are data fields and 1 is a symbolic ( 1 of the columns is totaled by another symbolic). I am trying to programmically populate this edittable, as I have been advised by others to use the editable for display only due to some of it's "quirks". Therefore, I have created buttons to Add, Edit, or Delete rows in the editable, each with code to perform the relevant updates.

My problem is that I can seem to populate the fields as long as I use get/set "RECORD" property in the edittable as I can get my symbolic total to change/display correctly, but I cannot get the form to display the updated values in the edittable.

I have searched the forum and have found some helpful and relevant postings but nothing seems to work. I have tried using "DEPROP" and "LIST" properties and have tried firing various events related to the editable but with no luck. I know that it is probably something simple that I have overlooked.

I would be greatful is someone could shed some light on this for me.


At 13 NOV 2002 09:28AM dsig@sigafoos.org wrote:

AR]I am trying to programmically populate this edittable, as I have been advised by others to use the editable for display only due to some of it's "quirks". Therefore, I have created buttons to Add, Edit, or Delete rows in the editable, each with code to perform the relevant updates.

Dsig]Not sure which 'quirks' you are talking about (there are so many to choose from) but it sounds like you have a re-calc problem. Yes? We use editables in many circumstances where the user just types the info into the edit table and all calcualtions are performed.

AR]My problem is that I can seem to populate the fields as long as I use get/set "RECORD" property in the edittable as I can get my symbolic total to change/display correctly, but I cannot get the form to display the updated values in the edittable.

DSig]Not sure you need to use RECORD. I just put a test button on a PO form which changes the value of qty in the 3rd item row. I GetProp Defprop, update the position, setprop defprop and Calc the TOTALs column and everything is updated.

could you better define the table control, columns and what you are trying to do

dsig@sigafoos.org onmouseover=window.status=the new revelation technology .. a refreshing change;return(true)"

David Tod Sigafoos ~ SigSolutions

Phone: 971-570-2005

OS: Win2k sp2 (5.00.2195)

OI: 4.1.2


At 13 NOV 2002 09:47AM Donald Bakke wrote:

Andrew,

The basic rule of thumb for updating edittables is this:

1. Use DEFPROP or INVALUE to populate the data columns of the edittable.

2. Then use Send_Event(EdittableName, "CALCULATE", ColNo) to recalc the symbolic columns of the edittable.

dbakke@srpcs.com

SRP Computer Solutions, Inc.


At 13 NOV 2002 01:59PM Andrew Roberts wrote:

Dave/Don:

Thanks for your input.

The editable consists of three columns, column 1 is a list of ids, column 2 is symbolic and xlates a description, column 3 is an amount.

I have included the section of the commuter module that runs as a CLICK event of the Add pushbutton. The subroutine called calculates the amount column and appends a new value in the idList and amountList arrays. The total field gets updated but I get no display in the edittable. It remains blank.

idList =Get_property( "EARNINGS.DBTABLE_ADDL_EARNINGS", "DEFPROP", 1:@fm:0)

amountList =Get_property( "EARNINGS.DBTABLE_ADDL_EARNINGS", "DEFPROP", 3:@fm:0)

action =ADD'

Addl_Earnings_Edittable_Update(empID,hourlyRate,regHours,idList,amountList,action)

retval=Set_property( "EARNINGS.DBTABLE_ADDL_EARNINGS", "DEFPROP", idList, 1:@fm:0)

retval=Set_property( "EARNINGS.DBTABLE_ADDL_EARNINGS", "DEFPROP", amountList, 3:@fm:0)

retval=Send_Event( "EARNINGS.DBTABLE_ADDL_EARNINGS", "CALCULATE", 2)

retval=Send_Event( "EARNINGS.ADDL_EARNINGS_TOTAL_PAGE2", "CALCULATE")

Do you see anything wrong in what I am doing?


At 13 NOV 2002 03:03PM Richard Bright wrote:

First issue is your use of 'DEFPROP' in the EditTable. The 'DEFPROP' (or default property) of EditTable is 'ARRAY'. That is, calling 'DEFPROP' or 'ARRAY' is equivalent.

This means that you could get the contents of the entire table with one get_property, then extract the cell(s) for which you needed the information. Use Get_Property(MyTable,'SELPOS') to determine the column/row as need be.


At 13 NOV 2002 03:40PM Andrew Roberts wrote:

I changed my program to perform one get property and one set property and then I updated either editTableArray or editTableArray and again my symbolic total field calculates and displays properly but my edittable remains completely blank.

Is there no other event, property, or message that needs to be called in order to repaint the editable data on the form, equivalent to the display.action=redisplay.all$ in Arev?

Or is there something I could have done to the edittable to stop it from displaying the data contained in it?

This is really puzzling.


At 13 NOV 2002 03:53PM Andrew Roberts wrote:

I have solved my problem.

I did not realize that edittable array would be initially populated with blank entries equal to the number of rows displayed in the control. I come from an Arev background and so was assuming that for a new record the table would be null. I happened to scroll down the editable and found my data below the bottom of the area displayed.

Thanks again for the help.


At 13 NOV 2002 04:02PM Donald Bakke wrote:

Andrew,

Are you saying that none of the columns in your edittable get displayed or just the symbolic columns in your edittable don't get displayed?

At first glance the logic looks okay, however, I see that you have hardcoded the window name (i.e. "EARNINGS"). This will get you into trouble with multi-instance windows. OI appends a "*n" to the window name to distinguish between multiple running copies of the same window. In these cases it is always best to use @Window. For instance:

"EARNINGS.DBTABLE_ADDL_EARNINGS"

…should be…

@Window:".DBTABLE_ADDL_EARNINGS"

dbakke@srpcs.com

SRP Computer Solutions, Inc.


At 13 NOV 2002 04:04PM Donald Bakke wrote:

I have solved my problem.

Cool! You will still want to implement my recent suggestion to use @Window instead of the literal name of your window.

dbakke@srpcs.com

SRP Computer Solutions, Inc.


At 13 NOV 2002 04:30PM Andrew Roberts wrote:

Thanks, I will make the change.


At 15 NOV 2002 04:32PM Richard Bright wrote:

or editTableArray and again my symbolic total field calculates and displays properly but my edittable remains completely blank…..]

Yes, by using the you were appending a new row value. Which is why I suggested identifying the row that you were in using the SELPOS property (which returns Col:@fm:Row).

Glad problem solved.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/34a89185cdfbd9a985256c700049fdac.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1