How to select rows from a table, concantenate their respective ids...

Hello,

Would anyone know of way (hopefully declarative, as i'm a JS noob) that I can select rows from a table, concatenate their respective ids, and send that concatenate field to another model's condition

So example table has 5 rows i select , first 2, the Id would be concatenated as such: '0011W00001wQsPb','0011W00001wQrTV'

And the ability to use this concatenate field to activate & set value of another's field condition

Thank you!

Comments

  • Hi Dave,

    I am new to Skuid too. So hopefully someone else will add to this comment. But I had a similar request; I needed to take the ids of the selected rows and add them to a field in a concatenated format. I'm pretty sure once you get them into the field you can use that field in the condition. My question was answered here. Hope it helps.

    https://community.skuid.com/discussion/7977887/generate-a-soql-from-the-results-of-a-model-and-populate-a-field-with-the-soql#latest

  • Pat VachonPat Vachon 💎💎💎

    Here you go.

    1. Create a model called ConditionRows.
    2. Create a condition on your target model to use a field from another model using the new model, it's operator set to in, and field as I assume to be Id.
    3. Set your mass action to:
      1. Adopt Rows to ConditionRows
      2. Query target Model

    Also another reason to have folders for Models as I would create a folder for all the non component used models.

  • Mark LMark L ✭✭✭✭

    Note that from my testing (v1 pages) there is a hidden limit on the number of rows that can be passed from one model to the condition of another model. That limit here I don't believe is an exact limit, and could sneak up on you. Typically unless I'm absolutely sure that the number of rows I'm passing is small I won't use 'in (rows from) another model' conditions. When you do hit the limit, the over-limit rows are simply not passed to the model condition so you only end up with some of the data being passed to the condition, and the rest not. It won't be obvious when this happens as there is no error or anything like that, you just simply end up with partial data returned from the query in your end result.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!