Author Topic: Multi-value Add/Delete  (Read 4049 times)

adewitt

  • Professional
  • ***
  • Posts: 45
Multi-value Add/Delete
« on: October 05, 2011, 01:38:46 PM »
I have two attributes that are multi-value.

Whenever I add, insert or delete values in each attributes I want the after process to maintain a file that is a crossreference.  So, whenever I add or insert I want to add a record containing the value to the crossreference and when I delete the value I want to delete the record from the cross reference.

I'm sure I have read that there are variables that I can use to tell me whether it's an add (insert) or a delete allowing me to go to correct subroutine in my after process.  Can someone tell me where I can find information on those variables?

Thanks.

precisonline

  • President
  • Administrator
  • Rock Star
  • *****
  • Posts: 1612
    • Precision Solutions
Re: Multi-value Add/Delete
« Reply #1 on: October 05, 2011, 03:01:05 PM »
There is a process slot that is called when a row is removed from a mv'd list.  Press F3 on the C (Control/Dep/Read prompt) and the process slot can be found there.  As to figuring out if someone added a row with Ctrl-Ins, there isn't any such thing to my knowledge.  You could restrict the multivalue set using CI (instead of just C) which would prevent people from inserting rows in the middle, then they could only add rows to the end.  Anything added (as checked in the Process After on the field) would be something new.  You could also compare @RECORD<x,@CNT> to @ORIG.REC<x,@CNT> to see if the value had been changed.
-Kevin
Accidents "happen"; success, however, is planned and executed.

adewitt

  • Professional
  • ***
  • Posts: 45
Re: Multi-value Add/Delete
« Reply #2 on: October 06, 2011, 07:02:04 AM »
Thanks.