filter items by branch in item card proplem

Your code means that you are searching for User ID value in User Setup table…but you didnt have any record in User Setup table with User ID in User ID field…

I put in user id in table user setup value Ahmed .this user work in program and it doesn’t have any problem.but this error after i write this code found in all users

Use

IF Usersetup.GET(USERID) THEN BEGIN

END;

OK error not show and item card open but

all branches show with user i added in user setup table

I assign global dimension code =A TO USER AHMED IN SETUP TABLE when i open item card and 1- press f5 it show all items to all branches (a,b,c)

2- branch filter not show meaning i see free space but when i search in table i see it with actual name

thanks

You applied code on Item Card and your expecting result on Item List, Is it correct?

meaning if i want to see affect in item list must made in table not item card form if this true in which trigger in the table . i m sorry to ask you more

It means you need to add in Item List form also…

You need to write code on every form that you need to filter out.

I but code above in

IF UserSetup.GET(USERID) THEN BEGIN
IF (UserSetup.“Global Dimension 1 Code” <> ‘’) THEN
FILTERGROUP := 2;
SETRANGE(“Global Dimension 1 Filter”,UserSetup.“Global Dimension 1 Code”);
FILTERGROUP := 0;
END

item list in open trigger of form but until know not applied i see all branches as before

and also i but user in setup then login with this user and no result

why and how i solve

IF UserSetup.GET(USERID) THEN BEGIN

message(usersetup.“user id”); Here check which user id is shown.
IF (UserSetup.“Global Dimension 1 Code” <> ‘’) THEN BEGIN
FILTERGROUP := 2;
SETRANGE(“Global Dimension 1 Filter”,UserSetup.“Global Dimension 1 Code”);
FILTERGROUP := 0;
END;

END;

Try this ?

I test what you say it not work.

it give me name of user found in setup but not give me branch i assign in set up table.

it give me all branches how we will solve this proplem

thanks

can any one help me .

i make every thing but not show any result.what i expect to do when i make user in user setup table and assign dimension to it.

when i open with this user i can see location i assign in user setup but why not work i dont know can any one help me

thanks

can you show us the screen shot of the user setup form, the code where you have written (Sales Header Form).

Give us the whole screen shot.

I thanks you very much for interest I make picture arranged and in sequence like following :

http://www.mediafire.com/?58hqkr7kpvssyve

and if you need more details told me

thank you very much

thanks for you guys i goteded the problem in

change your code from

SETRANGE(“Global Dimension 1 Filter”,UserSetup.“Global Dimension 1 Code”);

to

SETRANGE(“Global Dimension 1 Code”,UserSetup.“Global Dimension 1 Code”);

thanks amol,manish ,mohana all

G8