extreme Posted February 26, 2020 Posted February 26, 2020 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.
bcooney Posted February 28, 2020 Posted February 28, 2020 Perhaps just attach a value list of survey types to the field ?
extreme Posted February 28, 2020 Author Posted February 28, 2020 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.
comment Posted February 28, 2020 Posted February 28, 2020 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.
extreme Posted February 28, 2020 Author Posted February 28, 2020 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.
comment Posted February 28, 2020 Posted February 28, 2020 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.
extreme Posted February 28, 2020 Author Posted February 28, 2020 WOW thank you very much that worked a treat. Thank you for your help much appreciated.
Recommended Posts
This topic is 2082 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now