Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall I_SETDEL(window_id, set_name, field_list[, ...][, status])
The ID of the input window containing the fields. (n)
The name of the input set. (a)
One or more field specifications. (a)
(optional) Returned with a non-zero value if the field or fields were not found in the set, or with zero if the field or fields were found and successfully deleted from the set. Status must be the twelfth argument. (n)
I_SETDEL enables you to remove fields or lists of fields (specified in field_list) from an input set during program execution. You can specify up to nine field lists (field_list arguments), each of which can have up to nine field specifications. The maximum length of a field_list is 99 characters. Additional characters are ignored. For information on field specifications, see Field specifications.
The specified fields or lists of fields are deleted from the loaded input window set. You can use I_SNAPSHOT to save or restore the set definition.
If a field_list has multiple field specifications, separate the field specifications with any character except alpha characters, numeric characters, dollar sign ($), underscore (_), and square brackets ( [ or ] , which are used to enclose dimension specifications for repository arrayed fields). For example:
"name, birthday, soc_sec_no, employer, phone, policy_no, conditions"
If passed, status must be the twelfth argument. Therefore, if you pass status, but you specify fewer than nine fields or lists to be removed, you must use commas in place of the non-specified fields.
If you pass status, the first field that is not found within the set causes I_SETDEL to cease processing and return with the error status true. In this case, none of the fields following the one that caused I_SETDEL to terminate are deleted from the set. If you don’t pass status and a specified field is not found within the set, a fatal error occurs.
The following example does input to the set that gets a name and asks whether there is a co-signer. If no co-signer exists, the next set is modified to skip the fields for the name and address of the co-signer. Then the full set is re-established and the process is repeated.
.include "WND:tools.def" record id ,i4 c_id ,i4 stat ,d3 snapshot ,a20 record data applicant ,a30 joint ,a3 addr ,3a30 cosign ,a30 coaddr ,3a30 proc xcall u_start("setdel") xcall i_ldinp(id, g_utlib,"setdel") xcall i_snapshot(D_COPY, id, snapshot) xcall m_ldcol(c_id, g_utlib, "input", D_NOPLC) do begin xcall i_input(id, "name", data, c_id) if (g_select) exitloop if (joint.eq."No") then xcall i_setdel(id, "detail", "cosign coaddr",,,,,,,,, stat) else xcall i_snapshot(D_LOAD, id, snapshot) xcall i_input(id, "detail", data, c_id) xcall i_init(id) end until (g_select) xcall u_finish .end
The input window definition looks like this:
.input setdel, 10, 65 .field applicant, a30, pos(1,1), prompt("Applicant's name "), req .field joint, a3, pos(1,50), prompt("Co-signer? "), sel(0,2,2,"YES","NO") .text applicant, pos (4,1) \hAddress of Applicant\-h .field addr, 3a30, pos(5,1) .text cosigner, pos (4,34) \hName & Address of Co-signer\-h .field cosign, a30, pos(5,34) .field coaddr, 3a30, pos(6,34) .set name, setdel, applicant, joint .set detail, setdel, addr, cosign, coaddr .end