Flowfield + UserId

Hello, Is it possible to include the userid into the calcformula of a flowfield? I created Table A wich contains a field with the userid. In Table B i have created a flowfield which should indicate that for the current user a record exsits in Table A. Table A also contains the key of table B. I created the following calcformula: Exist(“Table A” WHERE (Key=FIELD(Key),UserId=FILTER(USERID))) This doesn’t work! Is this possible at all?

You have to use a FlowFilter in your Flowfield and set the Userid as the value for the Flowfilter

I don’t understand exactly what you mean. Can you explain me?

Hi, create a new field caled UserIDFilter in Table A. use this Field in your calcformula: Exist(“Table A” WHERE (Key=FIELD(Key),UserId=FIELD(UserIDFilter))) before you call the CALCFIELDS-statement you have to set a filter like: setrange(UserIDFilter,USERID()); i.e. have a look at the fields 64 Date Filter 70 Net Change in the table 27 Item br Josef Metz

THNX i understand. I created the flowfilter and flowfield but when i open a form which is filtered with the flowfield it takes a long time to show all the records. i tried to set a different key but that has no effect. Any idea to make it faster?

Perhaps you have to change the sort of the keys. For Flow-Fields Navision uses the first key that fits all filtered fields but that may not be the best. Can you give me more details? if you “DrillDown” the Flow-Field and it takes a long time to show the record, the calculation takes also a long time. br Josef Metz

You need a key on Table A: Key,UserID I’m assuming that Key isn’t the Primary Key. If Key is already the primary key on this table, I wouldn’t expect to see any speed issues at all. Excellent explanation Josef. [:)]