Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Developing Sample App

$
0
0
Re: Developing Sample App
FoxInCloud
Re: Developing Sample App
03/13/2012
02:20:36 AM
3GD050VX1 Show this entire thread in new window
Gratar Image based on email address
From:
To:
Attachments:
None
Supporting fields of buffered tables as ControlSource is currently scheduled in version 1.31.

Recommended data update method is views

Please check out FoxInCloud road map in case of doubt


We still need help in getting our sample app (maintenance form) to run under FiC. This app works in VFP IDE but when running under FiC in a browser, the app does not save a buffered record added to a free table. We click the Add button and focus moves the first text box. We enter the data and click Save button. The data is not saved. BTW, When entering data, the cursor moves to the next field on its own after a few seconds. Is there something we need to do differently?

Form load event:
IF NOT USED("users")
USE users IN 0 SHARED
ENDIF

IF NOT USED("Projects")
USE c:\fictest\data\projects.dbf IN 0 SHARED
ENDIF
IF NOT USED("Units")
USE c:\fictest\data\units.dbf IN 0 SHARED
ENDIF
SELECT Units
SET ORDER TO DPIDSeq
SELECT Projects
SET ORDER TO domainpid
SET FILTER TO units.domain = projects.domain AND units.pid = projects.pid IN Units
SET DELETED ON
SET MULTILOCKS ON && Must turn on for table buffering.
= CURSORSETPROP('Buffering', 5, 'units' ) && Enable table buffering.

Form Add button Click event:
SELECT units
cDomainString = "HOME"
cProjectString = projects.pid
SELECT MAX(seq) FROM units WHERE domain = cDomainString AND pid = cProjectString AND NOT DELETED() INTO CURSOR maxseq ;
READWRITE
IF VARTYPE(maxseq.max_seq) = "X" && .NULL.
nextseq = "001"
ELSE
nextseq = STRTRAN(STR(VAL(maxseq.max_seq)+1,3)," ","0")
ENDIF
SELECT units
INSERT INTO units (domain,pid,seq,modelevap,qty,selleach,tonnage,uniqueid) ;
values (users.domain,projects.pid,nextseq,"",1,0,"3",SYS(2015))
thisform.refreshdata()
Thisform.GrdUnits.Refresh
Thisform.txtModel_no.setfocus

Form Save Click event:
SELECT units
* TABLEUPDATE(.T.)
TABLEUPDATE()
thisform.grdunits.setfocus



-- thn (FoxInCloud)


Viewing all articles
Browse latest Browse all 10393

Trending Articles