I need a fresh pair of eyes to see what I'm doing wrong:
Powerbuilder 11.5.1 running MS SQL Server 2008
The relevant window has a datawindow dw_1. The column reason in the satawindow is a dddw. I want to change the column to point to another dddw according to the usergroup of the user - certain values will be filtered out by the new dddw.
My code:
// original dddw d_adm_commlog_reason
IF g_str_user.s_role_name = 'STAFF' then
s1 = dw_1.Modify("reason.DDDW.Name = 'd_adm_commlog_reason_csr'")
l1 = dw_1.GetChild("reason", idwc_reason)
END IF
s1 returns an empty string, L1 returns -1. The dddw is not populated after retrieve.
I have also tried
dw_1.Modify("reason.DDDW.DisplayColumn ='cod_desc'")
dw_1.Modify("reason.DDDW.DataColumn ='cod_code'")
ven though the display and data columns are the same for the two DDDWs. These commands return empty strings.
Thanks,
Nigel