Project and Portfolio Management Practitioners Forum
cancel

Is there a way to create validation for directory chooser that is dynamic?

Highlighted
bzdafro
Honored Contributor.

Is there a way to create validation for directory chooser that is dynamic?

I have been creating directory choosers for any environment I need to connect too. I was wondering if its possible to create a dynamic one instead. It can point to the same environment name everytime, but it needs to be able to dynamically point to app_code.UD.physical base path. The package knows the app code so it might be possible. I'm just not sure if I need to use the token-based environment override or static environment override, and then what to use on the overriding envinronment & overriding client basepath. I tried some combinations and it doesnt want to resolve. Has anyone done this?
4 REPLIES
Marlene Mazzeo
Super Contributor.

Re: Is there a way to create validation for directory chooser that is dynamic?

I am using token-based for both our directory chooser and file chooser. It is based on the Source Environment selected for the object type, which is our token [P_ADHOC_SOURCE], so this is what we enter as the Environment Token on our custom directory chooser and file chooser.
bzdafro
Honored Contributor.

Re: Is there a way to create validation for directory chooser that is dynamic?

I tried filling in a token for the Environment Token field in the directory chooser validation. I am using [P_SRC_ENV], which is set on the object type, and has a constant value set, and the visible field = the environment name. I get an error when I try to submit a package line, and click on the directory chooser that I created. "The environment specified for this FTP connection could not be found. Please check your configuration and ensure that a valid environment is specified KNTA-11140. I will look up this error as well.
bzdafro
Honored Contributor.

Re: Is there a way to create validation for directory chooser that is dynamic?

If anyone runs into this, the token needs to reference the environment_id, and not the environment_name.
bzdafro
Honored Contributor.

Re: Is there a way to create validation for directory chooser that is dynamic?

reference the environment_id