CALCFIELDS

Kc_NirvanaKc_Nirvana Member Posts: 146
Hello
I have a table 50000 that had this fields
1 No.
2 User
3 Post Date
4 UserIDSession
5 ExistsUser

The field 4 and 5 are flowfields. If user = useridsession then existsuser=true

When I create a form and put put on source table view Where existsUser=Const(yes) the form doesn't show any records.
Anyone knows the problem?
Junior Consultant & Developer in Dynamics NAV

"I'm worse at what I do best
And for this gift I feel blessed
Our little group has always been
And always will until the end"

Nirvana - Nevermind - Smells Like Teen Spirit

Answers

  • matttraxmatttrax Member Posts: 2,309
    Search the forum for how to do a flowfield based on another flowfield. It's a little tricky to do it, but I think I remember a post about it.
  • kapamaroukapamarou Member Posts: 1,152
    Kc_Nirvana wrote:
    Where existsUser=Const(yes)

    What about changing to : where UserIDSession <> 0 or
    using flowfield that counts the entries in the session for the user and filtering that to <> 0?

    Do you really need a flowfield based on another flowfield?
  • Kc_NirvanaKc_Nirvana Member Posts: 146
    Imagine that i need a form to show only the documents that the user created.
    I don't want to the user see another document that is not them.
    So i create a flowfield that calculates the user that entered and a flowfield that returns true if the document belonged to the user entered
    Junior Consultant & Developer in Dynamics NAV

    "I'm worse at what I do best
    And for this gift I feel blessed
    Our little group has always been
    And always will until the end"

    Nirvana - Nevermind - Smells Like Teen Spirit
  • matttraxmatttrax Member Posts: 2,309
    Why not just store the user that created it on the record itself and filter on that field? Seems a lot easier.
  • Kc_NirvanaKc_Nirvana Member Posts: 146
    matttrax wrote:
    Why not just store the user that created it on the record itself and filter on that field? Seems a lot easier.
    But that's want i want.
    The document has a field that is the user that created the document.
    But i want that only that user can see that document
    Junior Consultant & Developer in Dynamics NAV

    "I'm worse at what I do best
    And for this gift I feel blessed
    Our little group has always been
    And always will until the end"

    Nirvana - Nevermind - Smells Like Teen Spirit
  • BeliasBelias Member Posts: 2,998
    in the onopenform
    FILTERGROUP(10);
    rec.setrange("created by user",USERID);
    FILTERGROUP(0);
    
    or am i missing something in the post? :-k
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • Kc_NirvanaKc_Nirvana Member Posts: 146
    So simple......
    That worked...... =D>
    Thanks
    Junior Consultant & Developer in Dynamics NAV

    "I'm worse at what I do best
    And for this gift I feel blessed
    Our little group has always been
    And always will until the end"

    Nirvana - Nevermind - Smells Like Teen Spirit
  • matttraxmatttrax Member Posts: 2,309
    You'll probably want to add some sort of permissions to it. I'd imagine that some people should be allowed to see every document.
Sign In or Register to comment.