I have a Dialog with the following "Hidden" controls:
a5ws_guid
groups
ulink
userid
email
and the following "Textbox" controls"
Req_ID
Password
and the following "Advancedbutton"
Import
and the following code on "OnClick" event of the advancedbutton:
*****************************************
CurrentForm.Controls.groups.value = a5ws_get_guid_from_group("customers",request) 'groups populated
dim qxd_recs as n
dim vClientid as c
dim t as p
t= table.open("[PathAlias.ADB_Path]\cust_temp.dbf")
query.order=""
query.filter = "Req_ID = \""+alltrim(CurrentForm.Controls.Req_ID.value)+"\""
qxd = t.query_create()
qxd_recs = qxd.records_get()
IF qxd_recs = 1 THEN
dim tbl as p
tbl = table.open("[PathAlias.ADB_Path]\customers.dbf")
tbl.enter_begin()
tbl.Code = alltrim(CurrentForm.Controls.Password.value)
tbl.Contact = t.name
tbl.Title = t.title
tbl.Company = t.company
tbl.Street = t.street
tbl.Box = t.Pobox
tbl.City = t.City
tbl.State = t.State
tbl.Zip = t.Zip
tbl.Phone = t.Phone
tbl.Email = t.Email
tbl.Updated = t.Date
tbl.enter_end(.t.)
vClientid = alltrim(tbl.Customer_id)
CurrentForm.Controls.userid.value = alltrim(tbl.Email) 'userid populated
CurrentForm.Controls.email.value = alltrim(tbl.Email) 'email populated
CurrentForm.Controls.ulink.value = alltrim(vClientid ) 'ulink populated
tbl.close()
qxd.drop()
t.close()
a5ws_save_user_values(CurrentForm,request) ' validate and save
ELSE
qxd.drop()
t.close()
END IF
CurrentForm.RedirectTarget = "aswindex.a5w"
**********************************************
The purpose of the dialog component is to import certain customers from a "temp" table into the "customers"
table and since the Security Framework is enabled to enter a record into the "websecurity_users" table at the
same time. The record is written to the "Customers" table but not to the "websecurity_users" table.
My understanding is that if the control names in the Dialog Component are identical to the fields in the
"websecurity_users" table, the "a5ws_save_user_values(CurrentForm,request)" function will save the values
to the "websecurity_users" table. The fields in the "websecurity_users" table are "Guid, Userid, Password,
Email, and Ulink".
What am I doing Wrong??
Thanks
Jas
a5ws_guid
groups
ulink
userid
and the following "Textbox" controls"
Req_ID
Password
and the following "Advancedbutton"
Import
and the following code on "OnClick" event of the advancedbutton:
*****************************************
CurrentForm.Controls.groups.value = a5ws_get_guid_from_group("customers",request) 'groups populated
dim qxd_recs as n
dim vClientid as c
dim t as p
t= table.open("[PathAlias.ADB_Path]\cust_temp.dbf")
query.order=""
query.filter = "Req_ID = \""+alltrim(CurrentForm.Controls.Req_ID.value)+"\""
qxd = t.query_create()
qxd_recs = qxd.records_get()
IF qxd_recs = 1 THEN
dim tbl as p
tbl = table.open("[PathAlias.ADB_Path]\customers.dbf")
tbl.enter_begin()
tbl.Code = alltrim(CurrentForm.Controls.Password.value)
tbl.Contact = t.name
tbl.Title = t.title
tbl.Company = t.company
tbl.Street = t.street
tbl.Box = t.Pobox
tbl.City = t.City
tbl.State = t.State
tbl.Zip = t.Zip
tbl.Phone = t.Phone
tbl.Email = t.Email
tbl.Updated = t.Date
tbl.enter_end(.t.)
vClientid = alltrim(tbl.Customer_id)
CurrentForm.Controls.userid.value = alltrim(tbl.Email) 'userid populated
CurrentForm.Controls.email.value = alltrim(tbl.Email) 'email populated
CurrentForm.Controls.ulink.value = alltrim(vClientid ) 'ulink populated
tbl.close()
qxd.drop()
t.close()
a5ws_save_user_values(CurrentForm,request) ' validate and save
ELSE
qxd.drop()
t.close()
END IF
CurrentForm.RedirectTarget = "aswindex.a5w"
**********************************************
The purpose of the dialog component is to import certain customers from a "temp" table into the "customers"
table and since the Security Framework is enabled to enter a record into the "websecurity_users" table at the
same time. The record is written to the "Customers" table but not to the "websecurity_users" table.
My understanding is that if the control names in the Dialog Component are identical to the fields in the
"websecurity_users" table, the "a5ws_save_user_values(CurrentForm,request)" function will save the values
to the "websecurity_users" table. The fields in the "websecurity_users" table are "Guid, Userid, Password,
Email, and Ulink".
What am I doing Wrong??
Thanks
Jas