I'm trying to have a value that is calculated based on a parameter and a database. I would like to use this value throughout the rest of my file.
As an example, suppose I have two tables, one where I have a list of people's names and genders. The name of the person that I'm interested in is stored in a parameter, but I'd like to be able to easily access that person's gender elsewhere in my workflow. Is there an easy way to do this? I included an example in the attachment with block notes describing my problem. Thanks!
Currently parameters are defined globally and you can't have parameters derived dynamically from other parameters or aspects of block output data.
Instead you should use a block - as you have done - to introduce the gender as a cell in a block output, then find a way of configuring your downstream blocks to work from cell data rather than parameters. Is this possible? What kinds of things do you want to do with the gender 'parameter'?
It is possible for some cases but not for others. I have two primary cases where I want to use this:
1) I need to pull data from a different database table depending on the gender. I have a database table for males and a different database table for females
2) I need to add values to a database table and require a primary key. I can currently do that, but it takes about 5 blocks to get the max value of the index column. This would be very simple if I could use a calculated parameter.
Do you have any other way to get to a specific table based on a value calculated from a parameter?
You will need to use Server edition with Scheduler XML actions to automate the process of applying custom parameter values, executing a workflow that retrieves the derived parameter values, then feeds those results back as further custom parameter values. This will require some level of scripting on your part.