Setting Configured Values from a script?

Is there a way to set values to a “Configured Value” from a script? Even better, is there a way to set a Configured Value without showing that value in the settings?

I was storing these values in a Credential or creating a “settings file” with FileManager, but these introduce UX problems, especially for less knowledgeable users.

It looks like we are most of the way there.

Here’s my use case: I need several values for API calls in the script. To make things easier, especially for less knowledgeable users, I’d like to ask the user to paste a URL into a Configured Values field and have the script parse the API values from the URL. I need a fallback in case the parser fails (because the user’s URL is something I didn’t think of). My best fallback idea is to use a Prompt to ask for the missing API values–it adds complexity to the UX only if errors happen. The question is: What do I do with the values from the Prompt? Writing those values to hidden Configured Values would be perfect, but writing to regular Configured Values would be ok.

Otherwise, I think I’ll need to remove the URL and the parsing feature, and just ask for the API values directly.

Thanks!

I think the most elegant way to handle that case at the moment would be to put as clear a possible directions for what you need in the configured value definition, and when you validate that value in your action, simple exit with a prompt reiterating those requirements and directing the user to update the action’s configuration - you could even include a helpURL value in that prompt if you wanted to direct them to further explanation.

I’m not sure about providing a way to set configured values from script, I’ll think about that. A way to reset configured values might be adequate, so that the next time a user tried they would be re-prompted to enter new values.

That is the solution I was looking for! Since I didn’t actually build the prompt, I didn’t put 2 and 2 together. I added the Action to the Directory: Flick-to-Jira

I still think setting configured values could be useful. I work with people who are fully capible of using a tool like this Action but don’t want to learn about domains and keys and parsing urls. It’s not make-or-break–and I have no idea what the side effects might be. :grinning_face:

1 Like