Mark XY Brown 24.Jan.12 12:42 PM a Web browser Domino Designer 6.0.3 Windows XP
Some users have just complained to me that a button in a database has stopped working. The database in question is a sandpit environment (thankfully!), and I can replicate the problem. I can't understand it, though.
Here's the code:
tmp:=@PickList([Custom]:[Single]; ""; "ProdLU"; "All Products for RFCs"; "Pick the required product from the list"; 4);
@SetField("RFCProdT1"; @Word(tmp; "~"; 1));
@SetField("RFCProdT2"; @Word(tmp; "~"; 2));
@SetField("Product"; @Word(tmp; "~"; 3));
The value in tmp is indeed what I expect (a hidden column containing the three levels of product hierarchy banged together with tildes) - I've used @StatusBar to confirm this.
However, all of a sudden, the three @SetField functions don't do anything. The code runs, but the values are not dropped into the fields. I've tried replacing them with the FIELD keyword, but that doesn't help either.
If I enter values in the three fields individually and then try the button, the values are left untouched. So at least it's not entering nulls into the fields.
I have worked around the issue by getting the action button to dump the selected value into an environment variable, and then adding code to the Exiting script of field Product to pick up that environment value and parse it. The script then parses the value and uses the FieldSetText method to dump the elements into the relevant fields. I'd still like the action formula to work again, though!