Batch Insert - Syntax for field (Before insert, remove records that meet the following conditions)

评论

3 条评论

  • Avatar
    AgilePoint NX Support

    Gwen,

    I think the left side of the condition should be a table column name for comparison.

    Here it seems like you have both values
    (${/pd:AP/pd:processFields/pd:var_BU_Filter} = Business_Unit) .

    Help document: https://documentation.agilepoint.com/00/appbuilder/cloudenvShapeBatchInsert.html 

     

    Thanks

    AgilePoint NX Support

    0
    评论操作 固定链接
  • Avatar
    John Morgan

    I too have the same/similar issue. I would like to use "BATCH INSERT" to delete the old records with a matching "WORKFLOW_NO" before inserting the updated data. However, I too do not know the syntax for the "Remove All Old Records" input box. The doc link provided by "AgilePoint NX Support" is not helpful, as it does not have an example of the syntax.

    Experimenting I found that [ WORKFLOW_NO = '123456' ] works, but only for deleting records with WORKFLOW_NO set to '123456'. When I try to use [ WORKFLOW_NO = '${/pd:AP/pd:processFields/pd:WorkflowNo}' ] to read the workflow number from the "parent form", the deletes do not happen. I am guessing that this input does not do the replacement of '${/pd:AP/pd:processFields/pd:WorkflowNo}' with the field value. Rather, the text is taken literally, and since there are no records with WORKFLOW_NO set to literal '${/pd:AP/pd:processFields/pd:WorkflowNo}', nothing is deleted before the insert.

    Is what I am trying to do not possible with "BATCH INSERT"?

    0
    评论操作 固定链接
  • Avatar
    John Morgan

    To work around this, I ended up using a "DELETE RECORD" activity just before the "BATCH INSERT" activity. The "DELETE RECORD" activity does support using [ WORKFLOW_NO = '${/pd:AP/ ... /pd:WORKFLOW_NO}' ] to delete only the records with the same WORKFLOW_NO as the "parent table".

    I would still like to know if this is possible, using only a "BATCH INSERT" activity.

    0
    评论操作 固定链接

请先登录再写评论。