Index: trunk/ippTools/src/faketool.c
===================================================================
--- trunk/ippTools/src/faketool.c	(revision 25324)
+++ trunk/ippTools/src/faketool.c	(revision 25835)
@@ -177,4 +177,7 @@
     PXOPT_LOOKUP_STR(tess_id, config->args, "-set_tess_id", false, false);
     PXOPT_LOOKUP_STR(end_stage, config->args, "-set_end_stage", false, false);
+    PXOPT_LOOKUP_STR(data_group, config->args, "-set_data_group", false, false);
+    PXOPT_LOOKUP_STR(dist_group, config->args, "-set_dist_group", false, false);
+    PXOPT_LOOKUP_STR(note, config->args, "-set_note", false, false);
 
     // default
@@ -265,5 +268,5 @@
 
         // queue the exp
-        if (!pxfakeQueueByCamID(config, cam_id, workdir, label, reduction, expgroup, dvodb, tess_id, end_stage)) {
+        if (!pxfakeQueueByCamID(config, cam_id, workdir, label, data_group ? data_group : label, dist_group, reduction, expgroup, dvodb, tess_id, end_stage, note)) {
             if (!psDBRollback(config->dbh)) {
                 psError(PS_ERR_UNKNOWN, false, "database error");
@@ -330,7 +333,8 @@
     PXOPT_COPY_F32(config->args, where, "-sun_angle_max", "sun_angle", "<");
     PXOPT_COPY_STR(config->args, where, "-label", "fakeRun.label", "==");
-
-    if (!psListLength(where->list)
-        && !psMetadataLookupBool(NULL, config->args, "-all")) {
+    PXOPT_COPY_STR(config->args, where, "-data_group", "fakeRun.data_group", "==");
+    PXOPT_COPY_STR(config->args, where, "-dist_group", "fakeRun.dist_group", "==");
+
+    if (!psListLength(where->list)) {
         psFree(where);
         where = NULL;
@@ -339,32 +343,16 @@
     }
 
-    PXOPT_LOOKUP_STR(state, config->args, "-set_state", false, false);
-    PXOPT_LOOKUP_STR(label, config->args, "-set_label", false, false);
-
-    if ((!state) && (!label)) {
-        psError(PXTOOLS_ERR_DATA, false, "parameters are required");
-        psFree(where);
-        return false;
-    }
-
-    if (state) {
-        // set fakeRun.state to state
-        if (!pxfakeRunSetStateByQuery(config, where, state)) {
-            psFree(where);
-            return false;
-        }
-    }
-
-    if (label) {
-        // set fakeRun.label to label
-        if (!pxfakeRunSetLabelByQuery(config, where, label)) {
-            psFree(where);
-            return false;
-        }
-    }
-
+    psString query = psStringCopy("UPDATE fakeRun JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id)");
+
+    // pxUpdateRun gets parameters from config->args and updates
+    bool result = pxUpdateRun(config, where, &query, true);
+    if (!result) {
+        psError(PXTOOLS_ERR_DATA, false, "pxUpdateRun failed");
+    }
+
+    psFree(query);
     psFree(where);
 
-    return true;
+    return result;
 }
 
@@ -1162,8 +1150,11 @@
                                  fakeRun->workdir,
                                  fakeRun->label,
+                                 fakeRun->data_group,
+                                 fakeRun->dist_group,
                                  fakeRun->dvodb,
                                  fakeRun->tess_id,
                                  fakeRun->reduction,
-                                 fakeRun->end_stage
+                                 fakeRun->end_stage,
+                                 NULL // note does not propagate
         )) {
             psError(PS_ERR_UNKNOWN, false, "failed to queue warpRun");
