Passing or sharing parameters between modules

Hello all! :wave:t5: :wave:t5: :wave:t5:

I have recently started branching out into modules.

Previously, for each project I used multiple groups in the Main module with a stack of parameters. The parameters are usually one file name or location, and then about 10 or 15 calculated parameters, which I call up at various points in the workflow.

Examples of my parameters are:

Enthuse_May23_OUTPUT_CRM. csv
Enthuse_May23_OUTPUT_finance.csv
Marathon_Summer_mailing_proof
Marathon_Summer_mailing_MC.csv
Marathon_Summer_mailing_CRM.csv
Input folder
Working folder
Campaign Title
Ticket #

and so on…

Now that I’m using modules, I want to know the best way to simply call one of these existing parameters that I have curated in the Main module, without having to re-produce, copy and paste etc.

I’ve tried Shared Memory, BUT, it recalls the parameter as a column, which adds an extra (unecessary) field to my output file and throws out my CRM upoad template. :worried:

I WAS trying Iterate, Iterate Column, Iterate table, but I’m going round in circles - ha ha! My brain is iterating! :rofl: :face_with_spiral_eyes: and I don’t know if I need to continue down this :rabbit: :rabbit2: hole and suspect that there may be a more efficient way to simply kick a parameter into another module. :thinking:

If anyone has an example of where they’ve done this or similar, or have seen a post about this use case and are happy to share, I would be extrenmely grateful.

Thank you in advance! :pray:t5:

I used to use parameter table and convert to json and pass the json-value as parameter. The module will have to parse the JSON. That helped me a lot.

1 Like

Hello @nbegbaaji ,

try to use these actions:

  • Parameter table: show parameters in an EM table:
    image
    In this example the parameters are named A, B, C, D, E with their value (1,2,3,4,5)

  • Construct Json: encode this table in a JSON value:
    image

now you can pass this JSON string as parameter to module2
image

where you’ll use the “Parse JSON” action and it and retrieve all the parameters:
image

Obviously, this don’t generate parameters in the module2, you’ll have to use the decoded table as parameters.

2 Likes

Thanks @AndreaM. I’ll try this and report back! :pray:t5: