Specify Condition on a Table Relation Property

Hello everyone,
I'm creating a table in which there's a field for which is specified the property Table Relation = Item (so I can scan the item and select the one which I want).
I would like to delete from the drop-down list which appears the items which have been already saved in my table (I think I need to specify a Condition ? And if so how ?)
I hope my English is clear enough to let you understand my problem.
Thank you all for the helping !
Have a nice weekend

Stefano

Answers

  • PurpleHazePurpleHaze Member Posts: 42
    You mean to filter out the Items which have been already saved in this "Item No." field in other records, right?
  • Stefanodt15Stefanodt15 Member Posts: 4
    Hello, yes I want to see on my drop-down list which appears when I select the field (related to table ITEM) all the Items except that one that I have already saved in the table on which my page is based. Hope I have been clear enough. Thanksss
  • PurpleHazePurpleHaze Member Posts: 42
    edited 2021-11-15
    I see...

    I guess you don`t want to see all those items already selected even on other records (not only the record you currently selceted) in your new table.

    You could teoretically create a new flow field in Item table with CalcField Exist, something like this: Exist("Sales Line" WHERE (No.=FIELD(No.))) Of course, replace Sales Line with your own table. And then in your new table in table condition add "This new FlowField" CONST "No". I hope it is clear. Although I am not sure how would this work performance-wise, if you would have millions of records... Please test it on your set.

    P.S. There are of course also other possibilities which would not include adding a condition to the TableRelation property, but writing some additional code OnLookup or OnDrillDown, preparing your list (with a temp table, or MARKEDONLY) and then selecting a record user selected with GETRECORD.
Sign In or Register to comment.