Skip to Content
-1

Creating field that would pull one of two values from two different fields

I am trying to create a field, Z_REP_NAME_PERM_SUB, in a query where I have two created fields, Z_REP_NAME4 and Z_REP_NAME5. They deal with substitutes for users. Z_REP_NAME4 and Z_REP_NAME5 only have up to one user. Z_REP_NAME5 could be blank and Z_REP_NAME4 could be blank. If Z_REP_NAME4 is blank, Z_REP_NAME5 is blank. When I type a user into Z_REP_NAME_PERM_SUB field and if the user is in Z_REP_NAME4, I want the Z_REP_NAME_PERM_SUB field to display the user found in Z_REP_NAME4. When I type a user into Z_REP_NAME_PERM_SUB field and if the user is in Z_REP_NAME5,I want the Z_REP_NAME_PERM_SUB field to display the user found in Z_REP_NAME4. If for some reason Z_REP_NAME4 and Z_REP_NAME5 have the same user in the two fields, I want the Z_REP_NAME_PERM_SUB field to equal the Z_REP_NAME4 field. Any assistance is greatly appreciated! Here is my example code:

IF Z_REP_NAME_PERM_SUB = Z_REP_NAME4.
Z_REP_NAME4 = Z_REP_NAME_PERM_SUB.
ENDIF.
IF Z_REP_NAME_PERM_SUB = Z_REP_NAME5.
Z_REP_NAME5 = Z_REP_NAME_PERM_SUB.
ENDIF.
IF  Z_REP_NAME_PERM_SUB = Z_REP_NAME5
AND Z_REP_NAME4.
Z_REP_NAME_PERM_SUB = Z_REP_NAME4.
ENDIF.
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers