ui-only formula field (MODEL_LOOKUP) to filter table

PaulPaul Member, Sonar ✭✭
edited September 2019 in Questions
Hello,
I'm trying to use Skuid to help automate an Excel process.  What we want to do is do is a vlookup from one table to another.  This works using the model_lookup ui-only formula value.

However, we want to perform a mass action on those items of the same lookup value, so I need to be able to filter the table to only those values so we can select all and hit the appropriate mass update action.

I've seen that this was not possible in previous versions because ui-only fields can't be used as model conditions, but those posts were quite old so I'm hoping the answer has changed.  I'm also willing to do javascript if that is an option.

Please let me know your thoughts

Thanks,
Paul

Comments

  • edited March 2018
    Paul,
    What data are you looking up in your formula field?  If it is 'Id' type field, you may be able to use the Id in the current row as your filter.  If it is some kind of aggregate data (like a count of records), then you will need to use JavaScript.
    Thanks,
    Bill
  • PaulPaul Member, Sonar ✭✭
    edited September 2019
    It's not an aggregate, it is just a value from the model_lookup formula function (custom text field matched on another custom text field from a different sf table).  The lookup works fine, but the field is not available for any sorting or filtering because it is a ui-only formula field.

    So for example, if I have a table(1) with the following:
    1 A
    2 B
    3 B

    And then another table(2) with the following:
    X 1
    X 2
    Y 3

    And then in Skuid, I build a model from table 2 that does a model lookup on table 1 column 1 matching to table 2 column 2, then the result table is:
    X A
    X B
    Y B

    Now, what if I want to filter the table by "B" (the result of the model lookup)?

    Thanks!



  • Rob HatchRob Hatch Skuad, Sonar ✭✭
    edited September 2019
    Paul.  We have added more support for client side filtering since those posts that you referred to.  So the first thing is: Make sure you are on a current version of Skuid.   (You can go here to check it out:  skuid.com/releases) 

    Then you should be able to make a condition on that model lookup formula field.  One gotcha is that UI only fields are always appended to the bottom of the field list popup.  So scroll to the bottom and you should see it. 

    Once you have a filterable condition on the UI field - go to your table and create filter that has method "Client" 

    You should be good... 
  • edited March 2018
    Rob,

    Good stuff!  Thanks!

    Bill
  • PaulPaul Member, Sonar ✭✭
    edited March 2018
    Thanks Rob,
    I was able to get it to work by setting as a toggled condition and setting the model to "Process Model client-side".


  • Rob HatchRob Hatch Skuad, Sonar ✭✭
    edited March 2018
    Cool!  Glad you got it working... 
Sign In or Register to comment.