1001fx - NoCode functions icon

1001fx - NoCode functions

1001fx is a set of functions for any automation platform. Our functions are simple, very well tested, scalable and offer features that most automation platforms do not offer.

Actions74

spreadsheet → Hlookup Spreadsheet Function for an Array

AI-generated

Overview

This node provides a "Hlookup Spreadsheet Function for an Array" operation, which performs a horizontal lookup (HLOOKUP) on a provided array of data. It searches for a specified value in the first row of the array and returns the value from another specified row in the same column. This is useful for automating spreadsheet-like lookups within n8n workflows, such as extracting values from tabular data, mapping codes to descriptions, or retrieving configuration parameters.

Example scenarios:

  • Extracting product prices by SKU from a table.
  • Mapping user roles to permissions using a lookup table.
  • Fetching localized strings based on language codes.

Properties

Name Meaning
Data Array of lines with mixed values. The main table/array to perform the HLOOKUP on.
Lookup value The value to be found in the specified row of the data.
Row The row index (starting from 0) from which to return the value after finding the match.
Ignore case sensitivity Sets case sensitivity for lookup operation. If true, the search ignores case differences.

Output

  • json:
    The output will contain the result of the HLOOKUP operation. Typically, this is the value found at the intersection of the matched column and the specified row.
    • If successful, the output is the looked-up value.
    • If not found, the output may include an error message or null value.

Example output:

{
  "result": "Found Value"
}

or, in case of error:

{
  "error": "Lookup value not found"
}

Dependencies

  • External Service: Requires access to the 1001fx API.
  • API Key: Needs 1001fxApi credentials configured in n8n.
  • n8n Configuration: No additional environment variables required beyond standard credential setup.

Troubleshooting

  • Common Issues:

    • Invalid Data Format: Ensure the "Data" property is a valid array of arrays (rows).
    • Row Index Out of Bounds: The "Row" property must refer to a valid row index within your data.
    • Lookup Value Not Found: If the lookup value does not exist in the first row, the result will be empty or an error.
    • Case Sensitivity Mismatch: If "Ignore case sensitivity" is false, ensure the case matches exactly.
  • Error Messages:

    • "Lookup value not found": The value was not present in the first row.
    • "Row index out of bounds": The specified row does not exist in the data.
    • "Invalid data format": The input data is not structured as expected.

How to resolve:

  • Double-check your input data structure.
  • Verify the row index is correct.
  • Adjust the case sensitivity option as needed.

Links and References

Discussion