How to assign a list of text into a Custom State which based on an Option Set schema

App Context

Okay, my app is basically allowing users to upload multiple PDF files then ask us to extract the content of each PDFs.

Setup

I am using the File & MultiFile Uploader · BEP Plugin.

After the file is uploaded, it returns a list of file names.

Goal

I need to :

  • show the list of files into these table
  • allowing users to input specifically which pages they want to extract
  • allowing users to input password to unlock the PDF
Image

Hypothesis

I explored and concluded that I need to create a Custom State which is a list that could temporarily store the input values before submitting as a JSON to an API. The Custom State will contain these “columns”:

  • File URL (i.e. “www. awss3. com/ 12345”)
  • File Name (i.e. “myfile.pdf”)
  • Pages (i.e. “1-3”)
  • Password (i.e. “password123”)

I have created these as an Option Set (“Uploaded Files Metadata”).

Image


I have set the Custom State (“Uploaded State”) to use this Option Set as the schema.

Image

Problem

My question is, how to assign the Uploaded File Names into the Custom State’s File Name column?

I have tried creating this workflow that “set state of an element”

Image


But it’s red.

Image


Help me fix this, I couldn’t find any topic regarding this, chatGPT nor other AI doesn’t help either. Thanks a lot for the help!