Prompt User to choose from records

Hi There,

I simply try to let User choose from records in same namespace but different module and work on that record.
I hope its not too stupid to ask, but i couldnt find the answer, tried couple of things.

First i added a Function with Type “Compose records search” and piped the result in the “options” Field on the options Prompt which obviously didnt worked.

Now i created a empty KV with name “begleiter_list” and then an iterator which goes through the desired records and hits an expression like f.e.:

  • set(begleiter_list,begleiter.values.generatedname, begleiter.recordID)
  • merge(begleiter_list,{begleiter.values.generatedname: begleiter.recordID})
  • begleiter_list.begleiter.values.generatedname = begleiter.recordID
  • begleiter_list + {begleiter.values.generatedname: begleiter.recordID}

I also tried a few other approaches i didnt recall. i really hope you can give me a hint here.

Most of the time i get error:
workflow 272618223415853060 step 15 execution failed: expression “set(begleiter_list,begleiter.values.generatedname, begleiter.recordID)” failed: expected type expr.merger for parameter 0 but got map[string]string

What version are you using? I quickly threw together an example and it worked as expected (I’m running the 2022.3 dev version but this bit should be the same for 2021.9 also).
You can find the exported workflow on this gist.

A few things to note:

  • KV only allows string values for both key and value, so your first bullet won’t work since recordID is an uint64 under the hood.
  • my example uses format to get the recordID from uint64 to string.

Lastly, we’ll be adding a native support for a record picker (probably in 2022.3), but in the meantime, this workaround would do the trick.

Hi tjerman,
Thank you for the workflow, but i didnt got it to work, im on version 2021.9.6

I keep getting error:
workflow 268272284018409474 step 10 execution failed: expression “set(test, format(”%d", record.recordID)," failed: expected type expr.merger for parameter 0 but got map[string]string

I tried your workflow with just the change in module and namespace at iterator obj.
Can you think of a different workaround? Maybe using a different datatype (Not KV)?

It would be awesome for us to get it implement

Aha… 2021.9.7 resolved a bug we had with expressions and KV types.
I would suggest you upgrade to the latest version.

Oh, i didnt realised .7 is already out. I just upgraded but sadly i still get the same error.
Also deleted all website data along with cookies and cache just to be on the safe side

Interesting… did you use the workflow I’ve prepared for you?
If not, could you send it over?

I changed my workflow to include the format, and i also tried your test workflow to make sure i didnt mess up somewhere else, got same error

That’s strange… I’ll do some debugging to see if I can figure it out.
Just to be on the safe side; if you go to the /version route (example, make sure you see the .7 patch.

1 Like

Yes, complete string is:

Thank you so much for checking!

Thank you for the version.
Issue is addressed now and will be available in next release.

Here is commit reference.