Getting values when I don't yet know the key

I want to display the value of an object by mapping in the key itself manually. A payload comes in and I will query a database to get the path for the object in that database query. I won’t know the actual key until then.

I would like to map in that key which is a value from a database response in another module and have Make output the value of that key.

Here is the flow: Webhook with response > query database for key path > map in key path to print value in the next module

Can we enter a key in manually without actually using any of the {{1.key_name}} keys from the incoming data? For example I want the value in this image from 1.7.3, but I need to create the mapping in Make without being able to place the key in the field. I will dynamically get the key from a previous module. Is this possible?

**I know how to use get(map() and all that, but I don’t think I can do this because my value is not in an array so there is no mappable entity in order to extract the value from unless I am misunderstanding how this works.

If my question isn’t clear, here is a good deal more context so you can understand what I mean.

I am building a scenario that I want to be able to use for multiple clients for their Gravity Forms submissions without having to map in their form responses into a module for each new form I create for new clients.

Since each form has its own field id’s which are the keys of the values I want, I wanted to keep a database of field ids for each client we have.

So for one clients first name could be field 1, another it could be field 8, etc.

Each form gets its own row in the database of field ids that I can query upon scenario run. Then I’d like to be able to create a record of the actual form submission itself in another table. I want to dynamically grab the field id from the first table and display that so it will map in the form value for that field id.

Is there a way to manually call for values to be displayed without needing to have the {{}} around the value {{1.7.2}}?

There is a possibility by using the “keys” function but the variable (7.3 in this case) would have to be under the array of values.
Let’s say that the array would be this way:
image

Then you would use the “keys” and “get” function in the next module:
image
So you would get the “variable” as a value in the output:
image

Then you can use the “get” and “map” functions to retrieve that value.
image

Then you would get in the output the correct value:
image

2 Likes