//先判断有没有第一个Item,没有的话,用第一个;有的话,就新增一个; Local ApiObject &oBankCollectionItem; &oBankCollectionItem = &oBankCollection.Item(1); If All(&oBankCollectionItem) Then &oBankCollectionItem = &oBankCollection.insertItem(&oBankCollection.count()); End-If;
//根据传入的参数获取对应的数据,如果没有的话,则新增一条数据; Local ApiObject &oBankCollectionItem; &oBankCollectionItem = &oBankCollection.ItemByKeys(&dtEffdt); If NONE(&oBankCollectionItem) Then &oBankCollectionItem = &oBankCollection.insertItem(&oBankCollection.count()); End-If;