Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

can you attatch script steps to custom dialog buttons?...if they hit ok the script continues and if they hit cancel it ends?

Posted

Sure you can, VCH. Use something like:

Show Custom Dialog [ Buttons: "OK", "CANCEL" ; "Do you want to continue?" ]

If [ Get(LastMessageChoice) = 1 ]

... Perform Script[] or perform action

Else

... perform a different action or Exit Script

End If

LaRetta :wink2: :

Posted (edited)

thank you very much it worked beautifully

but i have a new question..

the dialog i set up is set up to allow the input of data into a non-editable field and at the same time automatically placing in account name and date that the entry was made in the field...

that part works fine...but if a second entry is made...the contents of first entry show up in t he dialog and if deleted there they are deleted from the field...which i don't want to happen...any ways to make this not happen

Edited by Guest
Posted (edited)

You need to post your specific script but I'm confident it can be corrected. :wink2:

You have ONE field sharing three pieces of information? Regardless, it can be handled.

Edited by Guest
Posted (edited)

the script :

show custom dialog["Reason";job info::HOLD NOTES]

if [ get(lastmessagechoice) = 1]

insert calculated result [job info::HOLD NOTES; ¶ & Get ( AccountName ) & " " & Get ( CurrentTime ) & " " & Get ( CurrentDate ) & ¶ & ¶]

go to field []

end if

go to field []

the result retruns something like this results

but when i do it again..the dialog for entering data looks like this dialog

and the point of the whole thing is that once a user enters information they can't go back erase it and say they never did it...but when you have to enter soemting a second time that dialog pop up gives a chance to delete all previous information...

and the go to field [] is so that the script exits the field so editing can't be done because when the script finishes with out it the curors is in the field for editing but by adding the go to feild [] it takes it to nothing therefore exiting the field

Edited by Guest
Posted

I'm just heading out the door and won't be back for another 10 hours but here's the basics:

Change what is presented to the user in the Custom Dialog to a global field.

Then use Set Field [] to set the contents of your audit field, something like:

Set Field [job info::HOLD NOTES ; global & " " & Get ( AccountName ) & " " & Get ( CurrentTime ) & " " & Get ( CurrentDate ) & "¶¶" & job info::HOLD NOTES ]

Untested. Sorry, I'm out the door. But HOLD NOTES should be set with first your global and associated info, then the contents of the HOLD NOTES field (what was there prior).

In this way, the User only sees the global info (or a blank global) for THEIR portion to enter and not the other stuff and the current (new line) is inserted at the top.

Posted

script exits the field so editing can't be done because when the script finishes with out it the curors is in the field for editing but by adding the go to feild [] it takes it to nothing therefore exiting the field

Actually, your audit field doesn't even need to be on the layout unless you want it for display purposes. Insert Calculated Result[] requires the field be present but Set Field[] does not. Also, Insert Calculated Result[] leaves the cursor in the field. Set Field[] doesn't even enter the field so there is no need to remove the cursor after a Set Field[]. :wink2:

If you ever DO need to remove the cursor from a field, I would suggest using Commit Records/Requests instead of Go To Field[]. That's its purpose after all. Also, I would test that global and allow graceful backout if empty. Otherwise, you might end up with lines of Account Names and dates without a purpose. And an audit line without purpose is an ugly sight. :ooo:

And sorry for the name misspell earlier. :blush2:

LaRetta

This topic is 7018 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.