Display shot count action
1 1

6 posts in this topic

Hi there,

 

Sorry this seems like it should be super simple, so I may just be missing something here...

 

Basically all I want is to run an action that will display the number of shots the user selects, preferably on a UI window that only shows a label and the shot count.  But the only way to output a UI window seems to be to return 'items', and even then the button on the form is always 'Submit'. Is there a way to print a 'Done' button instead, and when the button is pressed, the form disappears and the action concludes?

 

Or is there simply a better way to display information to the user within the web interface?

 

Thanks for the help.

 

Cheers!

Share this post


Link to post
Share on other sites

So is it a problem with the text on the button? "Submit" instead of something custom like "Done"?

 

You could also generate a report, and attach it to a job. Let the user know they need to press the job to download the report, in the return message.

Share this post


Link to post
Share on other sites

Thanks again for replying tokejepsen!

 

No, the problem is more what happens when the button is pressed. Right now when the user presses "Submit", the script basically runs again, like in a loop. Is there a way to quit the script instead when the button is pressed?  The only piece of information returned is honestly just the shot count, generating a report just to display one number will seem like overkill for our users.

 

Cheers!

Share this post


Link to post
Share on other sites

Heres an example of an action where it exists when the user clicks the submit button; https://gist.github.com/tokejepsen/77d02d8f2f09e27de08b

 

You basically query whether there are any values returned, meaning that the user has clicked the submit button; https://gist.github.com/tokejepsen/77d02d8f2f09e27de08b#file-gistfile1-py-L60

Share this post


Link to post
Share on other sites

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
1 1