February 26, 20205 yr Please can you help? I am trying to use a button to enter data into a field. I have a field name survey type I have three buttons survey 1, survey 2, survey 3, if I press survey 3 then I want that to be the data entered into the field. How can this be done any help would be grateful.
February 28, 20205 yr Author Hello bcooney Thank you but I figured it out at 4:30 this morning I attached a script trigger with the follow script if anyone else comes up with the same problem.
February 28, 20205 yr I don't see what this answer has to do with your question. Since we don't know what problem this is meant to solve, it's hard to express an opinion. However, there are some things that jump out immediately: 1. Your first case will always be executed. The expression GetField ( ... ) will return an error and the error will evaluate to true in a Boolean test. 2. For mutually exclusive choices, you should be using a single If block with Else If and Else branching - not multiple separate If blocks. 3. The entire thing could be reduced to a single Set Field step. 4. It would probably be simpler to make the target field auto-enter the intended value.
February 28, 20205 yr Author Hello Comment Im sorry I am a noobie I am still learning would you be so kind and show me the single Set Field Step please I would be so grateful.
February 28, 20205 yr I am guessing it could look like: Set Field [ T40_Analytical::Due_Date ; Get ( CurrentDate ) + If ( T40_Analytical::Turnaround = "24 hours" ; 1 ; GetAsNumber ( T40_Analytical::Turnaround ) ) ] This is assuming that the Turnaround field will contain either the text "24 hours" or a text in the format of "N days". In the former case, the calculation will add 1 day to the current date. In the latter case, the calculation will extract the N value and add it to the current date. As I mentioned earlier, you could use the same formula for auto-entering a calculated value into the Due_Date field, with no need for a script.
February 28, 20205 yr Author WOW thank you very much that worked a treat. Thank you for your help much appreciated.
Create an account or sign in to comment