| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > FieldPairsClass > FieldPairsClass Methods >====== AssignLeftToRight (copy from "left" fields to "right" fields) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[addpair add a field pair fieldpairsclass .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[assignrighttoleft copy from right fields to left fields .htm|{{btn_next_n.gif|Next page}}]] | | || **AssignLeftToRight** {{blk2blue.jpg|blk2blue.jpg}} The **AssignLeftToRight **method copies the contents of each "left" field to its corresponding "right" field in the List property. **Implementation:** For AddPair pairs, the "left" field is the //first //(left) parameter of the AddPair method; the "right" field is the //second //(right) parameter of the AddPair method. For AddItem pairs, the "left" field is the //only //parameter of the AddItem method. The "right" field is the FieldPairs supplied copy of the "left" field. **Example:** ** Fields.AddPair(CUST:Name,  CustQ.Name)  !establish Name pair** ** Fields.AddPair(CUST:Phone, CustQ.Phone) !establish Phone pair** ** Fields.AddPair(CUST:ZIP,  CustQ.ZIP)    !establish ZIP pair** ** !some code** ** IF ~Fields.Equal                        !compare field pairs** **  CASE MESSAGE('Abandon Changes?',,,BUTTON:Yes+BUTTON:No)** **  OF BUTTON:No** **   Fields.AssignRightToLeft     !copy changes to CUST (write) buffer** **  OF BUTTON:Yes** **   Fields.AssignLeftToRight     !restore original to CustQ (display) buffer** **  END** ** END** **See Also:**     [[addpair add a field pair fieldpairsclass .htm|AddPair]], [[additem add a field pair from one source field .htm|AddItem]], [[list recognized field pairs .htm|List]]