USERID and FlowField
Pawel_Mr
Member Posts: 7
Hi, my problem is:
I need to create a FlowField in the table and a CalcFormula should be like this (for example):
Count("Member Of" WHERE (User ID=FILTER(USERID)))
but "USERID" should return actual ID of logged user. Now it is only a text, not a function. How to write it correctly(and... i don't have permissions to use C/AL code in tables, forms and codeunits, only for reports)?
I need to create a FlowField in the table and a CalcFormula should be like this (for example):
Count("Member Of" WHERE (User ID=FILTER(USERID)))
but "USERID" should return actual ID of logged user. Now it is only a text, not a function. How to write it correctly(and... i don't have permissions to use C/AL code in tables, forms and codeunits, only for reports)?
0
Comments
-
You can make a new flowfilter "userid filter" and use this in your flowfield.
But this means you have to set this in e.g. the OnOpenForm trigger by code.
0 -
I can't do this like that. No C/AL code.
0 -
I don't know if this will work, it is just something that pops up in my mind.
Have you tried to make a flowfield to the session table.User id where My Sesion=TRUE ??0 -
It is a good idea. I will try it.0
-
Hi
This is bad calc formula?
Count("Member Of" WHERE (User ID=FILTER(USERID)))
This is good formula for mebut "USERID" should return actual ID of logged user. Now it is only a text, not a function.
USERID is not a text. It is global variable and holds actual logged user ID
Drilldown Didn't works because member of table have no property DrilldownFormID. You have to create new form (wizard on table member of , type = tabular form). Second step is set DrillDownFormId = New form ID in talbe "Member OF"
FlowField must works0 -
Formula
Count("Member Of" WHERE (User ID=FILTER(USERID)))
doesn't work. USERID in this case is only a text, just like MYID or PM. I know that e.g. in C/AL code USERID will return logged user ID but in CalcFormula of FlowField it appear to be just a text.0 -
I have no user in table member of because i logged on windows login
I change it now. I create one user in databese user.
Create FlowFileld in your table
UserIdFilter CalcFormula = Lookup(Session."User ID" WHERE (My Session=CONST(Yes)))
Create Second Flow
Count("Member Of" WHERE (User ID=FIELD(UserIdFlow)))
This Works fine.
I don't know how, because flowfield can't based on another flowfield but in this case this WORKS
FieldNo of first flowfield must be lower than your Count flowfield0 -
On your form which shows that field, both flowfield must be visible
Regards0 -
Yes, it really works! Thanks!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
