Jump to content
Server Maintenance This Week. ×

Help with button as input data to field


This topic is 1519 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

Link to comment
Share on other sites

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.

 

 

Screenshot 2020-02-28 at 08.06.53.png

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

This topic is 1519 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.