Skip to content

How to create a transition table in javascript? #3

@vdurante

Description

@vdurante

First of all, you are doing god's work. Me and my team use your blog on a daily basis, since adobe's documentation is lacking.

I was wondering if you could write a blog post about a subject...

I am trying to create and populate a transition table from a javascript code block. Nowadays I do this in a very hacky way: I query a random table with customs schema then I use a javascript block truncate the table and insert new data to it.

Unfortunately, I am working with a workflow which I can't use the method above. Do you know if it is possible to create a table from a javascript block?

I tried the following, but of course it didnt work, specially since vars.tablename` is undefined since there is no inbound population

sqlExec("ALTER TABLE " + vars.tableName + " ADD COLUMN sTest nvarchar(500)");
sqlExec("INSERT INTO "+ vars.tableName + "(sTest) VALUES ('foobar');");

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions