Hi! I need little advice: how to update parameters...
# ask-community
i
Hi! I need little advice: how to update parameters using view. My default param is [{"1":"a"}, {}]. I want to add value [{"1":"a"}, {"2":"b"}] using view. I choose List in parameter type and put in my json. But prefect show me next value ["{\"1\":\"a\"}, {\"2\":\"b\"}"]. How to create list with objs using view?
k
Hey @Ihor Bondartcov, I’ll give this a try
When you say view, do you mean the UI?
It’s rendering right for me. Are you on Cloud?
i
Yes, I mean UI. Yes in cloud.
k
Yeah both JSON and non-JSON render correctly for me. How are you registering this Parameter? This is my flow for reference:
Copy code
from prefect import task, Flow, Parameter
import prefect

@task
def abc(x):
    logger = prefect.context.get("logger")
    <http://logger.info|logger.info>(x)
    <http://logger.info|logger.info>(type(x))
    return x

with Flow("param_test") as flow:
    test = Parameter("test", [{"1":"a"}, {}])
    abc(test)

flow.register("bristech")
i
Did you change this param using UI?
I am registering it in the same way.
k
Yes I changed with the UI, so you can see the new value in the logs in the screenshot
Are you doing it from here?