[[https://www.revelation.com/|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]] ==== Changing focus - es, updating editline symbolic (OpenInsight Specific) ==== === At 16 NOV 2001 03:49:34PM b cameron wrote: === {{tag>"OpenInsight Specific"}} I really hate to ask but maybe because I have never had it explained and/or I have tried so many combinations I can't see the forest for the .... whatever. I have and edittable with col2 being dollar amt. If the user clicks a button the button script goes through, validates col1 and fills in a default amt for col2. This is ok. Under the edittable is an editline control that is bound to a symbolic that is the total of col2. How do I get col2 to update after the button script is done looping and has filled in the edittable col2 with the default values?? I have tried many many things. Thanks ---- === At 16 NOV 2001 04:07PM Oystein Reigem wrote: === Bruce, You mean how to get the [i]total[/i] to update? To get a control bound to a symbolic to update you send a CALCULATE event to the control: Status=Send_Event( CtrlName, "CALCULATE" ) This usually works. I have a couple of current cases where it doesn't work, but usually it does. If it's an edit table column that's bound to the symbolic, you need an additional parameter telling which column you mean: Status=Send_Event( CtrlName, "CALCULATE", ColNo ) - Oystein - ---- === At 16 NOV 2001 04:16PM b cameron wrote: === Oystein ]]You mean how to get the total to update? Yes ]]Status=Send_Event( CtrlName, "CALCULATE" ) So in this instance CtrlName is the editline or the edittable? ]]If it's an edit table column that's bound to the symbolic, you need ]]an additional parameter telling which column you mean: ]]Status=Send_Event( CtrlName, "CALCULATE", ColNo ) If adding the colno is CtrlName line or table? I tried it both ways and with a forward_event and nothing happens unless I click in the edittable that column. ---- === At 16 NOV 2001 04:31PM Oystein Reigem wrote: === Bruce, ]]You mean how to get the total to update? ]Yes ]]Status=Send_Event( CtrlName, "CALCULATE" ) ]So in this instance CtrlName is the editline or the edittable? CtrlName is the full name of the control with the symbolic that won't show the new value, i.e, the "total" edit line. E.g, @Window:".TOTAL". ]]If it's an edit table column that's bound to the symbolic, you need ]]an additional parameter telling which column you mean: ]]Status=Send_Event( CtrlName, "CALCULATE", ColNo ) Sorry for confusing you with this additional piece of information. ]If adding the colno is CtrlName line or table? CtrlName is the full name of the edit table. I don't understand what you mean by "line" in this connection. ]I tried it both ways and with a forward_event and nothing happens unless I click in the edittable that column. Don't Forward_Event. Just do a Send_Event right after you have filled in the cells of column 2. I think. Or ask help from Don Bakke - he's really good with these things. - Oystein - ---- === At 16 NOV 2001 04:42PM b cameron wrote: === o, Thanks, I have tried Call Send_Event(@WINDOW:".":edittableecontrol,"CALCULATE",10) Call Send_Event(@WINDOW:".":symeditlinecontrol,"CALCULATE") And still no go. Should I do this after each row is changed? That wouldn't seem right. ---- === At 16 NOV 2001 04:59PM Oystein Reigem wrote: === Bruce, Call Send_Event(@WINDOW:".":symeditlinecontrol,"CALCULATE") should work. (Btw - what's the "10" in Call Send_Event(@WINDOW:".":edittableecontrol,"CALCULATE",10) ?) - Oystein - ---- === At 16 NOV 2001 07:09PM b cameron wrote: === Sorry that is the column in the edittable that gets the values from the code in the button click event. BC ---- === At 16 NOV 2001 07:42PM Oystein Reigem wrote: === Bruce, You called it col2 earlier so I assumed it was column 2, but now you say it's 10. But be it 2 or 10 - it doesn't matter. As long as I didn't misunderstand anything. I have a similar case to yours: A control (in my case a list box, in your case a button) with a handler that changes values in an edit table, whereupon a symbolic edit line (in my case a counter for some data in the edit table, in your case a total for a column) must be calculated. And in my case it works. - Oystein - ---- === At 19 NOV 2001 09:27AM b cameron wrote: === Oystein, Well after many attemps, some help from Rev and overall general frustration I ended up tallying the values I needed as I looped through the table column. I then set the DEFPROP on the way out of the script. It works, maybe not the cleanest but... Thanks. ---- === At 19 NOV 2001 09:35AM Oystein Reigem wrote: === Bruce, But at Revelation they agreed that sending a CALCULATE [i]should[/i] work? - Oystein - ---- === At 19 NOV 2001 10:43AM b cameron wrote: === Yes but it didn't. There must be some extenuating circumstances. What they are is baffling to me at this point. ---- === At 19 NOV 2001 07:40PM Scott, LMS wrote: === Hi All If you used a commuter standard procedure, you could put the calculation for the total in one place and call it as often as you needed it and you wouldn't have the problem with the send event not working properly. It's a lot easier to debug too. Scott, LMS ---- === At 20 NOV 2001 03:49AM Oystein Reigem wrote: === Bruce, Ah. Silly me. Here's one reason some of my own cases haven't worked: I didn't use DEFPROP (or INVALUE) when I set the cell values in the edit table. To set a cell value [b]don't[/b] do [i]UnUsed=Set_Property( CtrlEntID, [b]"CELLPOS"[/b], Value, ColNo:@FM:RowNo )[/i] but rather [i]UnUsed=Set_Property( CtrlEntID, [b]"DEFPROP"[/b], Value, ColNo:@FM:RowNo )[/i] DEFPROP and INVALUE update the databound stuff that the symbolic needs when the latter calculates. CELLPOS, TEXT, ARRAY, LIST don't. Read about it in the DEFPROP article in the help file. - Oystein - [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=A78EA6E0E682FC1585256B06007266FC|View this thread on the forum...]]