Difference between revisions of "Redirecting pointers"

From VistApedia
Jump to: navigation, search
Line 16: Line 16:
 
Example of deleting two entries from file #50
 
Example of deleting two entries from file #50
 
^UTILITY("DIT",5946,0)=0
 
^UTILITY("DIT",5946,0)=0
^UTILITY("DIT",5946,0,1)="50^62.05^*P50'"
+
^UTILITY("DIT",5946,0,1)="50^62.05^*P50'" <--- File 50, field 62.05
 
^UTILITY("DIT",5946,0,2)="50^905^P50'X"
 
^UTILITY("DIT",5946,0,2)="50^905^P50'X"
 
^UTILITY("DIT",5946,0,3)="50.065^.01^M*P50'"
 
^UTILITY("DIT",5946,0,3)="50.065^.01^M*P50'"

Revision as of 18:59, 13 November 2005

I am going to use this page to hold notes about redirecting pointers. I want to be able to programatically change all pointers in all records that point to a given record, to point to a different pointer.

This is done in Fileman when a record is deleted and there are pointers to that record. The user is given the option to delete all pointers, or to redirect them to another record.

Notes:

The code that asks: "DO YOU WANT THOSE POINTERS UPDATED (WHICH COULD TAKE AWHILE)?" is in DITP.m

I believe the array of pointers to be transferred is stored in:

  ^UTILITY("DIT",$J,0)=0
  ^UTILITY("DIT",$J,0,index)=FileNumber^Pointer^FieldInfoCodes
  ^UTILITY("DIT",$J,DeletedIEN)=NewIEN;GlobalRef

Example of deleting two entries from file #50
^UTILITY("DIT",5946,0)=0
^UTILITY("DIT",5946,0,1)="50^62.05^*P50'" <--- File 50, field 62.05
^UTILITY("DIT",5946,0,2)="50^905^P50'X"
^UTILITY("DIT",5946,0,3)="50.065^.01^M*P50'"
^UTILITY("DIT",5946,0,4)="50.07301^.01^MP50'"
^UTILITY("DIT",5946,0,5)="50.0731^2^P50'"
^UTILITY("DIT",5946,0,6)="52^6^R*P50'X"
^UTILITY("DIT",5946,0,7)="52.41^11^P50'"
^UTILITY("DIT",5946,0,8)="52.6^1^R*P50'"
^UTILITY("DIT",5946,0,9)="52.7^1^R*P50'"
^UTILITY("DIT",5946,0,10)="53.1^24^RP50'"
^UTILITY("DIT",5946,0,11)="53.11^.01^MR*P50'"
^UTILITY("DIT",5946,0,12)="53.2102^.01^MR*P50'"
^UTILITY("DIT",5946,0,13)="53.23^.01^MR*P50'"
^UTILITY("DIT",5946,0,14)="53.4502^.01^M*P50'X"
^UTILITY("DIT",5946,0,15)="53.68^.13^P50'X"
^UTILITY("DIT",5946,0,16)="53.78^.07^P50'"
^UTILITY("DIT",5946,0,17)="53.795^.01^MP50'"
^UTILITY("DIT",5946,0,18)="55.05^1^P50'"
^UTILITY("DIT",5946,0,19)="55.06^24^P50'"
^UTILITY("DIT",5946,0,20)="55.0611^.02^P50'"
^UTILITY("DIT",5946,0,21)="55.07^.01^MR*P50'"
^UTILITY("DIT",5946,0,22)="58.11^.01^MR*P50'X"
^UTILITY("DIT",5946,0,23)="58.3^.01^RP50'"
^UTILITY("DIT",5946,0,24)="58.52^.01^MP50'"
^UTILITY("DIT",5946,0,25)="58.8001^.01^MR*P50'X"
^UTILITY("DIT",5946,0,26)="58.81^4^*P50'"
^UTILITY("DIT",5946,0,27)="58.81125^1^P50'"
^UTILITY("DIT",5946,0,28)="58.85^3^R*P50'"
^UTILITY("DIT",5946,0,29)="58.86^1^*P50'"
^UTILITY("DIT",5946,0,30)="58.86^19^P50'"
^UTILITY("DIT",5946,0,31)="58.87^4^*P50'"
^UTILITY("DIT",5946,0,32)="59^.52^*P50'"
^UTILITY("DIT",5946,0,33)="59.7^10.1^P50'"
^UTILITY("DIT",5946,0,34)="59.7^70^P50'"
^UTILITY("DIT",5946,0,35)="70.15^.01^M*P50'X"
^UTILITY("DIT",5946,0,36)="70.21^.01^M*P50'"
^UTILITY("DIT",5946,0,37)="71.055^.01^M*P50'"
^UTILITY("DIT",5946,0,38)="71.08^.01^M*P50'"
^UTILITY("DIT",5946,0,39)="71.9^5^*P50'"
^UTILITY("DIT",5946,0,40)="100.1^.01^RV"
^UTILITY("DIT",5946,0,41)="120.8^1^V"
^UTILITY("DIT",5946,0,42)="130.33^.01^*P50'"
^UTILITY("DIT",5946,0,43)="130.47^.01^*P50'"
^UTILITY("DIT",5946,0,44)="130.48^.01^*P50'"
^UTILITY("DIT",5946,0,45)="162.11^9^RP50'"
^UTILITY("DIT",5946,0,46)="351.61^4.01^P50'"
^UTILITY("DIT",5946,0,47)="362.4^.04^RP50'"
^UTILITY("DIT",5946,0,48)="615.23^.01^MP50'"
^UTILITY("DIT",5946,0,49)="695^.01^RP50'"
^UTILITY("DIT",5946,0,50)="699.53^.01^MP50'"
^UTILITY("DIT",5946,0,51)="699.74^.01^MP50'"
^UTILITY("DIT",5946,0,52)="727.809^62^P50'"
^UTILITY("DIT",5946,0,53)="727.819^67^P50'"
^UTILITY("DIT",5946,0,54)="801.43^.02^RV"
^UTILITY("DIT",5946,0,55)="810.31^.04^V"
^UTILITY("DIT",5946,0,56)="810.32^.01^V"
^UTILITY("DIT",5946,0,57)="811.52^.01^MVX"
^UTILITY("DIT",5946,0,58)="811.902^.01^MVX"
^UTILITY("DIT",5946,0,59)="9009032.4^.05^P50'"
^UTILITY("DIT",5946,3)="2862;PSDRUG("  <--- all pointers to IEN #3 to be redirect to #2862
^UTILITY("DIT",5946,48)="0;PSDRUG("  <-- all pointers to #48 to be changed to 0 (ie. deleted)
^UTILITY("DIT",5946,"3;PSDRUG(")="2862;PSDRUG("  #3 --> #2862
^UTILITY("DIT",5946,"48;PSDRUG(")="0;PSDRUG("    #48 --> #0 (deleted)


The transfer seems to be called with this:
  do ASK^DITP
  if %=1 do PTS^DITP