Flowfield

gumwitka
gumwitka Member Posts: 34
Hi All,

I would like to create field in the table that will have characteristic both of option field and flowfield (exist). What is need to gain is field in Job table that will lookup into Job Ledger Entry table check if there are booking for specific job in (for example) year 2006, if so I would like to see value 2006 in the Job table in my special field. If any booking were in 2005 I would like to see value 2005 in my field, and value Both if any booking were done in 2005 and also in 2006.

Do you have any ideas how I can solve that?

Answers

  • Rene70
    Rene70 Member Posts: 25
    It's not possible to do this with a standard field. You have to do it in the form, where you want to show this value. Put a global variable into a textbox and calculate the value you want to see in the OnAfterGetRecord-Trigger. There you can put any value you want into the variable.
    Maybe you should declare this variable as text. If you have a decimal-value, use the format-function to assign the value otherwise assign 'Both' to the variable.
    But there is one disadvantage by this solution. :cry: You can not put a filter on this specific textbox (you can but it has no effect :wink: )
  • gumwitka
    gumwitka Member Posts: 34
    Hi Rene,
    Thank you for your answer. Unfortunately it does not solve my problem 
    I have report that is based on Job table and for every job is retrieving data from Job Ledger Entry table. It works fine, but now users want to see only those jobs that had any booking in specific year (let’s say 2006). Of course when I let them make filter on Job Ledger Entry table (posting date) they will still have visible all the jobs. That is why I wanted to make in Job table special field that will indicate if this job has any booking in 2006 and then I could make a filter on this field. But as you are saying this is not possible.
    Do you have any ideas how I can solve this?
    [-o<
  • Miklos_Hollender
    Miklos_Hollender Member Posts: 1,629
    I think the requirement itself is not logical and users should rethink it: what do they want to see in 2007-2008?...

    If they just want to see the last entry's posting date, that's a logical requirment with a simple Max flowfield. You could also create a flowfilter for that, a Date Filter, so users can filter for 010105..123105 and then they see the posting date of the last entry during 2005, if there was any.

    I think this would be a lot more logical.

    Or, a COUNT-type flowfield ("number of entries") showing the number of entries, with a date filter. Then users can filter for a date range (a year) and filter the count field for <>0. But don't expect it to be fast, though.
  • gumwitka
    gumwitka Member Posts: 34
    BlackTiger, I used second solution (it was the shortest :D) and it seems to be working the way I wanted \:D/ I have implemented it and now waiting for users' reactions :) Great thanks!