Hi Robin,

[Given how the ARSLIST is performing these days, I'm sending this to you
directly as well as back to the list so that it'll hopefully get to you
more quickly.]

The very first thing I want to mention is that I got it wrong when I said
that a return value of 0 indicates failure  As Fred mentioned in an earlier
email in this thread 0 indicates success and 1 indicates failure. Sorry for
this, I guess there's no substitute for reading the actual docs.

So, it would appear that your operation was actually successful.  Still,
regardless of the return value, you're apparently not seeing your source
value appear in the target field.  My suspicion now is that other workflow
is perhaps wiping out the target field value after your
Application-Copy-Field-Value operation. You'll need to run logs to see if
this is what's happening.

But, as promised, I've put together and attached a .def file containing a
regular form (called TestAppCopyField) along with a single active link and
a single filter. The form has a bunch of character fields that you can use
as the source and target, three integer fields (a 'Source Field ID',
'Target Field ID', and 'Result'), and finally a button to trigger the
active link.  Both the filter and active link each have only one Set Fields
action that simply puts the result of this

*$PROCESS$ Application-Copy-Field-Value $Target Field ID$ $Source Field ID$*

into the 'Result' field.

I've tested this on both 8.1.1SP1 and an old 7.1 system I have lying
around, so it should work on anything between.

To test on the active link side, do this:

1) Import the .def file
2) Open the TestAppCopyField form in a browser or in the WUT
3) Enter some text into the character field named '800000000' (which is
also its field id)
4) Put that field id (800000000) into 'Source Field ID'
5) Put 800000001 into 'Target Field ID'
6) Click the "Transfer Data" button

The character field '800000001' should now have your value, and 'Result'
should contain 0.  Try different values as the source and target fields
(all of the field labels contain their field ids to make it easy).

To test the filter (which triggers on Submit or Modify), do this:

1) Open a New Request window on the form
2) Set the '800000000' field to some text value
3) Put 800000000 into 'Source Field ID'
4) Put 800000002 into 'Target Field ID'
5) Save the entry
6) Use a search window to locate the entry, the '800000002' field should
have your original text value and 'Result' should be 0
7) Change the 'Source Field ID', 'Target Field ID', and other field values
and Save to test it

Incidentally, I did confirm that the mechanism will do data conversions
(try using one of the integer fields as the source or target, and one of
the character fields as the other).

Let me know how it works.

-charlie


On Tue, May 6, 2014 at 3:29 AM, Robin Mathew <[email protected]> wrote:

> Hi Charlie,
>
> The operation is returning 0 value,ie failure.
>
> And, reference values are getting set correctly in the SourceFiledId and
> TargetFieldID.
>
> Based on my requirement I want this to be done in filter.
>
> Could you please share your code with me if you have already done this?
>
> Thanks in anticipation.
>
> Regards
> Robin
>
>
>
>
> _______________________________________________________________________________
> UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
> "Where the Answers Are, and have been for 20 years"
>

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"
char-set: UTF-8
#
#  File exported Wed May 07 08:11:11 2014
#
begin schema
   name           : TestAppCopyField
   core-version   : 2
   upgrade-version: 0
   num-fields     : 17
   timestamp      : 1399475389
   owner          : Admin
   last-changed   : Admin
   default-vui    : Default Administrator View
   num-vuis       : 1
   export-version : 12
   schema-type    : 1
   next-field-id  : 536870912
   permission     : 0\2
vui  {
   id             : 536870912
   name           : Default Administrator View
   label          : Default Administrator View
   timestamp      : 1399475389
   vui-locale     : 
   vui-type       : 1
   owner          : Admin
   last-changed   : Admin
   display-prop   : 1\20\4\26\Default Administrator View\
}
field {
   id             : 1
   name           : Request ID
   datatype       : 4
   fieldtype      : 1
   create-mode    : 2
   option         : 3
   timestamp      : 1399475389
   owner          : Admin
   last-changed   : Admin
   length-units   : 0
   maxlength      : 15
   clob-store-opt : 0
   menu-style     : 2
   qbe-match-op   : 1
   fulltext-optns : 0
   permission     : 4\1
   permission     : 0\1
   permission     : 3\1
 display-instance : 
536870912\14\3\41\2\77052\1500\99886\3600\4\6\1\7\40\2147483640\20\4\10\Request 
ID\21\41\2\0\400\7086\2100\27\8\16\28\6\4\29\6\1\60\40\1\65\41\2\0\0\0\0\143\&
 display-instance : 40\4294967295\151\41\2\7649\0\22834\2100\170\40\0\231\6\1\
}
field {
   id             : 2
   name           : Submitter
   datatype       : 4
   fieldtype      : 1
   create-mode    : 1
   option         : 1
   timestamp      : 1399475389
   owner          : Admin
   last-changed   : Admin
   length-units   : 0
   maxlength      : 254
   clob-store-opt : 0
   menu-style     : 2
   qbe-match-op   : 1
   fulltext-optns : 0
   default        : $-1$
   permission     : 4\1
   permission     : 3\1
 display-instance : 
536870912\16\3\41\2\77727\4000\102811\6100\4\6\1\7\40\2147483641\20\4\9\Submitter\21\41\2\0\400\6411\2100\27\8\16\28\6\4\29\6\1\60\40\1\61\40\30\65\41\2\0\0\&
 display-instance : 
0\0\66\41\2\22722\0\25084\2100\143\40\4294967295\151\41\2\6974\0\22159\2100\170\40\0\231\6\0\
}
field {
   id             : 3
   name           : Create Date
   datatype       : 7
   fieldtype      : 1
   create-mode    : 2
   option         : 3
   timestamp      : 1399475389
   owner          : Admin
   last-changed   : Admin
   permission     : 4\1
   permission     : 3\1
 display-instance : 
536870912\16\3\41\2\76715\6500\102811\8600\4\6\1\7\40\2147483642\20\4\11\Create 
Date\21\41\2\0\400\7424\2100\27\8\16\28\6\4\29\6\1\60\40\1\61\40\23\65\41\2\0&
 display-instance : 
\0\0\0\66\41\2\23734\0\26096\2100\143\40\4294967295\151\41\2\7986\0\23171\2100\170\40\0\231\6\0\
}
field {
   id             : 4
   name           : Assigned To
   datatype       : 4
   fieldtype      : 1
   create-mode    : 2
   option         : 2
   timestamp      : 1399475389
   owner          : Admin
   last-changed   : Admin
   length-units   : 0
   maxlength      : 254
   clob-store-opt : 0
   menu-style     : 2
   qbe-match-op   : 1
   fulltext-optns : 0
   permission     : 4\1
 display-instance : 
536870912\16\3\41\2\77165\9000\102811\11100\4\6\1\7\40\2147483643\20\4\11\Assigned
 To\21\41\2\0\400\6974\2100\27\8\16\28\6\4\29\6\1\60\40\1\61\40\30\65\41\2\&
 display-instance : 
0\0\0\0\66\41\2\23284\0\25646\2100\143\40\4294967295\151\41\2\7536\0\22721\2100\170\40\0\231\6\0\
}
field {
   id             : 5
   name           : Last Modified By
   datatype       : 4
   fieldtype      : 1
   create-mode    : 2
   option         : 3
   timestamp      : 1399475389
   owner          : Admin
   last-changed   : Admin
   length-units   : 0
   maxlength      : 254
   clob-store-opt : 0
   menu-style     : 2
   qbe-match-op   : 1
   fulltext-optns : 0
   permission     : 4\1
 display-instance : 
536870912\16\3\41\2\74353\11500\102811\13600\4\6\1\7\40\2147483644\20\4\16\Last 
Modified By\21\41\2\0\400\9786\2100\27\8\16\28\6\4\29\6\1\60\40\1\61\40\33\65&
 display-instance : 
\41\2\0\0\0\0\66\41\2\26096\0\28458\2100\143\40\4294967295\151\41\2\10348\0\25533\2100\170\40\0\231\6\0\
}
field {
   id             : 6
   name           : Modified Date
   datatype       : 7
   fieldtype      : 1
   create-mode    : 2
   option         : 3
   timestamp      : 1399475389
   owner          : Admin
   last-changed   : Admin
   permission     : 4\1
 display-instance : 
536870912\16\3\41\2\75703\14000\102812\16100\4\6\1\7\40\2147483645\20\4\13\Modified
 Date\21\41\2\0\400\8436\2100\27\8\16\28\6\4\29\6\1\60\40\1\61\40\23\65\41&
 display-instance : 
\2\0\0\0\0\66\41\2\24746\0\27108\2100\143\40\4294967295\151\41\2\8998\0\24183\2100\170\40\0\231\6\0\
}
field {
   id             : 7
   name           : Status
   datatype       : 6
   fieldtype      : 1
   create-mode    : 2
   option         : 1
   timestamp      : 1399475389
   owner          : Admin
   last-changed   : Admin
   enum-value     : New
   enum-value     : Assigned
   enum-value     : Fixed
   enum-value     : Rejected
   enum-value     : Closed
   default        : 0
   permission     : 4\2
   permission     : 3\1
 display-instance : 
536870912\17\3\41\2\79640\16500\114060\18300\4\6\1\7\40\2147483646\20\4\6\Status\21\41\2\0\400\4499\1800\27\8\16\28\6\4\29\6\1\60\40\1\61\40\0\64\6\1\65\41\2&
 display-instance : 
\0\0\0\0\143\40\4294967295\151\41\2\5061\400\34419\2200\170\40\0\230\4\46\5\0\New\1\Assigned\2\Fixed\3\Rejected\4\Closed\231\6\0\
}
field {
   id             : 8
   name           : Short Description
   datatype       : 4
   fieldtype      : 1
   create-mode    : 1
   option         : 1
   timestamp      : 1399475389
   owner          : Admin
   last-changed   : Admin
   length-units   : 0
   maxlength      : 254
   clob-store-opt : 0
   menu-style     : 2
   qbe-match-op   : 1
   fulltext-optns : 0
   default        : x
   permission     : 4\1
   permission     : 3\1
 display-instance : 
536870912\16\3\41\2\72665\19000\102811\21100\4\6\1\7\40\2147483647\20\4\17\Short
 Description\21\41\2\0\400\11473\2100\27\8\16\28\6\4\29\6\1\60\40\1\61\40\50\&
 display-instance : 
65\41\2\0\0\0\0\66\41\2\27784\0\30146\2100\143\40\4294967295\151\41\2\12035\0\27220\2100\170\40\0\231\6\0\
}
field {
   id             : 15
   name           : Status History
   datatype       : 4
   fieldtype      : 1
   create-mode    : 2
   option         : 3
   timestamp      : 1399475389
   owner          : Admin
   last-changed   : Admin
   permission     : 3\1
   permission     : 4\1
}
field {
   id             : 800000005
   name           : Target Field ID
   datatype       : 2
   fieldtype      : 1
   create-mode    : 1
   option         : 2
   timestamp      : 1399475389
   owner          : Admin
   last-changed   : Admin
   range-low      : -2147483647
   range-high     : 2147483647
   permission     : 0\2
 display-instance : 
536870912\18\3\41\2\22497\8000\39369\11500\4\6\1\5\6\2\7\40\2147483648\14\40\1\20\4\27\Target
 Field ID (800000005)\21\41\2\0\0\16872\1300\27\8\2\62\6\1\66\41&
 display-instance : 
\2\0\0\0\0\91\6\4\143\40\4294967295\151\41\2\0\1400\16872\3500\170\40\0\288\6\0\289\4\4\0x00\290\4\4\0x00\310\6\0\
}
field {
   id             : 800000001
   name           : 800000001
   datatype       : 4
   fieldtype      : 1
   create-mode    : 1
   option         : 2
   timestamp      : 1399475389
   owner          : Admin
   last-changed   : Admin
   length-units   : 0
   maxlength      : 255
   clob-store-opt : 0
   menu-style     : 2
   qbe-match-op   : 2
   fulltext-optns : 0
   permission     : 0\2
 display-instance : 
536870912\20\3\41\2\1124\5000\19234\8500\4\6\1\5\6\2\7\40\2147483649\14\40\1\20\4\9\800000001\21\41\2\0\0\18110\1300\27\8\2\60\40\1\66\41\2\15748\1400\18110\&
 display-instance : 
3500\91\6\4\143\40\4294967295\151\41\2\0\1400\15185\3500\170\40\0\231\6\0\288\6\0\289\4\4\0x00\290\4\4\0x00\310\6\0\5116\6\0\
}
field {
   id             : 800000000
   name           : 800000000
   datatype       : 4
   fieldtype      : 1
   create-mode    : 1
   option         : 2
   timestamp      : 1399475389
   owner          : Admin
   last-changed   : Admin
   length-units   : 0
   maxlength      : 255
   clob-store-opt : 0
   menu-style     : 2
   qbe-match-op   : 2
   fulltext-optns : 0
   permission     : 0\2
 display-instance : 
536870912\20\3\41\2\1124\1000\19234\4500\4\6\1\5\6\2\7\40\2147483650\14\40\1\20\4\9\800000000\21\41\2\0\0\18110\1300\27\8\2\60\40\1\66\41\2\15748\1400\18110\&
 display-instance : 
3500\91\6\4\143\40\4294967295\151\41\2\0\1400\15185\3500\170\40\0\231\6\0\288\6\0\289\4\4\0x00\290\4\4\0x00\310\6\0\5116\6\0\
}
field {
   id             : 800000006
   name           : Result
   datatype       : 2
   fieldtype      : 1
   create-mode    : 1
   option         : 2
   timestamp      : 1399475389
   owner          : Admin
   last-changed   : Admin
   range-low      : -2147483647
   range-high     : 2147483647
   permission     : 0\2
 display-instance : 
536870912\18\3\41\2\22497\12500\39369\16000\4\6\1\5\6\2\7\40\2147483651\14\40\1\20\4\18\Result
 (800000006)\21\41\2\0\0\16872\1300\27\8\2\62\6\0\66\41\2\0\0\0&
 display-instance : 
\0\91\6\4\143\40\4294967295\151\41\2\0\1400\16872\3500\170\40\0\288\6\0\289\4\4\0x00\290\4\4\0x00\310\6\0\
}
field {
   id             : 800000004
   name           : Source Field ID
   datatype       : 2
   fieldtype      : 1
   create-mode    : 1
   option         : 2
   timestamp      : 1399475389
   owner          : Admin
   last-changed   : Admin
   range-low      : -2147483647
   range-high     : 2147483647
   permission     : 0\2
 display-instance : 
536870912\18\3\41\2\22497\4000\39369\7500\4\6\1\5\6\2\7\40\2147483652\14\40\1\20\4\27\Source
 Field ID (800000004)\21\41\2\0\0\16872\1300\27\8\2\62\6\1\66\41\&
 display-instance : 
2\0\0\0\0\91\6\4\143\40\4294967295\151\41\2\0\1400\16872\3500\170\40\0\288\6\0\289\4\4\0x00\290\4\4\0x00\310\6\0\
}
field {
   id             : 536870921
   name           : Button:TransferData
   datatype       : 32
   fieldtype      : 1
   create-mode    : 2
   option         : 4
   timestamp      : 1399475389
   owner          : Admin
   last-changed   : Admin
   permission     : 0\2
 display-instance : 
536870912\10\2\8\1\3\41\2\42744\7000\51742\9100\4\6\1\5\6\2\7\40\2147483653\21\41\2\0\0\0\0\110\4\13\Transfer
 Data\143\40\4294967295\170\40\0\310\6\0\
}
field {
   id             : 800000002
   name           : 800000002
   datatype       : 4
   fieldtype      : 1
   create-mode    : 1
   option         : 2
   timestamp      : 1399475389
   owner          : Admin
   last-changed   : Admin
   length-units   : 0
   maxlength      : 255
   clob-store-opt : 0
   menu-style     : 2
   qbe-match-op   : 2
   fulltext-optns : 0
   permission     : 0\2
 display-instance : 
536870912\20\3\41\2\1124\9000\19234\12500\4\6\1\5\6\2\7\40\2147483654\14\40\1\20\4\9\800000002\21\41\2\0\0\18110\1300\27\8\2\60\40\1\66\41\2\15748\1400\18110&
 display-instance : 
\3500\91\6\4\143\40\4294967295\151\41\2\0\1400\15185\3500\170\40\0\231\6\0\288\6\0\289\4\4\0x00\290\4\4\0x00\310\6\0\5116\6\0\
}
field {
   id             : 800000003
   name           : 800000003
   datatype       : 4
   fieldtype      : 1
   create-mode    : 1
   option         : 2
   timestamp      : 1399475389
   owner          : Admin
   last-changed   : Admin
   length-units   : 0
   maxlength      : 255
   clob-store-opt : 0
   menu-style     : 2
   qbe-match-op   : 2
   fulltext-optns : 0
   permission     : 0\2
 display-instance : 
536870912\20\3\41\2\1124\13000\19234\16500\4\6\1\5\6\2\7\40\2147483655\14\40\1\20\4\9\800000003\21\41\2\0\0\18110\1300\27\8\2\60\40\1\66\41\2\15748\1400\1811&
 display-instance : 
0\3500\91\6\4\143\40\4294967295\151\41\2\0\1400\15185\3500\170\40\0\231\6\0\288\6\0\289\4\4\0x00\290\4\4\0x00\310\6\0\5116\6\0\
}
end
begin filter
   name           : TACF:OnSubmitModify:TransferData
   timestamp      : 1399475434
   owner          : Admin
   last-changed   : Admin
   filter-op      : 6
   enable         : 1
   filter-order   : 500
   wk-conn-type   : 1
   schema-name    : TestAppCopyField
   export-version : 12
   action {
      set-field   : 0\800000006\103\52\Application-Copy-Field-Value $800000005$ 
$800000004$\
   }
   errhandler-opt : 0
end
begin active link
   name           : TACF:OnButton:TransferData
   timestamp      : 1399475434
   export-version : 12
   owner          : Admin
   last-changed   : Admin
   actlink-order  : 0
   wk-conn-type   : 1
   schema-name    : TestAppCopyField
   actlink-mask   : 1
   actlink-control: 536870921
   enable         : 1
   permission     : 0
   action {
      set-field   : 0\800000006\103\52\Application-Copy-Field-Value $800000005$ 
$800000004$\
   }
   object-prop    : 2\60016\4\1\0\60017\4\1\0\
   errhandler-opt : 0
   errhandler-name: 
end

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"

Reply via email to