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)?
0
Comments
But this means you have to set this in e.g. the OnOpenForm trigger by code.
Have you tried to make a flowfield to the session table.User id where My Sesion=TRUE ??
This is bad calc formula?
Count("Member Of" WHERE (User ID=FILTER(USERID)))
This is good formula for me
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 works
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.
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 flowfield
Regards