The value of True/false field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2016 06:08 AM
In my table I have a field called u_active and the type is True/False.
In my record producer I have a drop down field the values of Add and Delete.
When a record is submitted with 'Add' flag the u_active field should be shown as true; and when a record is submitted with 'delete' flag the u_active field should be shown as false.
(we will keep the deleted records in the database as well)
I have set the default value of the u_active field as true in the dictionary.
in the script section of my record producer I have this code:
if(producer.Add_Delete=="Add")
rec.u_active='true';
if(producer.Add_Delete=="Delete")
rec.u_active='false';
rec.update();
} else{
rec.initialize();
rec.u_src_grp_no = group_ids[x];
rec.u_cid = producer.u_cid;
rec.u_renewal_month = producer.u_renewal_month;
rec.u_ctb_prgm_start_dt=producer.u_ctb_prgm_start_dt;
rec.u_ctb_prgm_end_dt=producer.u_ctb_prgm_end_dt;
rec.u_req_type=producer.Add_Delete;
rec.insert();
But it does not work!!!!!!!!!!!!! it always shows True. Any help would be greatly appreciated.
- Labels:
-
Scripting and Coding
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2016 06:58 AM
I create new records and then test
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2016 07:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2016 06:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2016 06:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2016 06:21 AM
Hello,
Can you try without the quotes:
rec.u_active = true;