Flowfield with a condition

Samba_JonesSamba_Jones Member Posts: 4
Dear Mibuso,

I have the following problem:
- 1 table (Type [option], Code[20]) holds information I imported in the form of 2 fields.
Example data:
Season;A
Season;B
Collection;2010

- The second table is the mapping table where a user can say "My season X should be mapped to Season A of my import"

- The second table also has a field called "Invalid", which is a boolean. This is currently a flowfield with the following formula :
"-Exist("CLX Imported Data" WHERE (Type=FIELD(Type),Code=FIELD(CLX Code)))"

So when a value that is currently mapped, is removed from the import table, this will show the record to be invalid.


This works fine, but now my problem: The mapping table can also map Locations, something which is never imported. Users simply input their value instead of selecting from a listform of available options.

If the type of the mapping record is of type "Location", the record can never be invalid. But ofcourse now the flowfield will search for an imported record of type Location and come up empty, thus showing it to be invalid.

Please help :)
Thank you.

Comments

  • rhpntrhpnt Member Posts: 688
    Content wise I don't really dig your problem but, if you can't do it with a flow field in the table then do it with a function in the form where you show the data. You can freely programm the function to return the data to show and call it on "Form - OnAfterGetCurrRecord()" or "Form - OnAfterGetRecord()" - depends on the type of form. To make it work just put the function in the SourceExpr property of the form controll.
  • Samba_JonesSamba_Jones Member Posts: 4
    Unfortunately, this "invalid" boolean needs to be kept up to date at all times, not just when in a form.

    Also: with every import of new data, all the old records get removed and new records are inserted thus making the use of the OnDelete trigger less than efficient.
  • rhpntrhpnt Member Posts: 688
    Take a look at the "Available Qty. to Pick" column in the "Pick Worksheet" form (7345) and you'll see what I mean.
  • Samba_JonesSamba_Jones Member Posts: 4
    Thank you for your effort rhpnt but I've just build around the problem using the OnModify and OnInsert triggers in both tables.

    Oh well...
Sign In or Register to comment.