Hide Parent List and Display Child regularly

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
abdeen26
User
Posts: 3

Hide Parent List and Display Child regularly

Post by abdeen26 »

is there a way to hide the parent SelectList using UserLevels and display child droplist as if i'm chosing a certain value from the original parent list that i hid ?? , a value for each UserLevel i mean.

i'm already using if statements to show and hide fields and set certain values for each userlevel but i'm stuck at the parent/child dynamic lists and i need to set parent list and display a diffrent child list for each userlevel.


motfs
User
Posts: 258

Post by motfs »

i'm chosing a certain value from the original parent list that i hid ?? , a value for each UserLevel i mean.

If you want to change the Parent Value for different UserLevel, try to add a filter for the Lookup table for the Parent Field (but make sure the Lookup Table has the desired value for the filter). Read Lookup Table -> Filter in help file for more detail.

Using if statements to show and hide fields?

Did you use Startup Script to hide or server side event? Post your code.

Please provide more info about the values in the parent/child fields, how are they related to user level? How do you filter the child field?


abdeen26
User
Posts: 3

Post by abdeen26 »

Did you use Startup Script to hide or server side event? Post your code.
** i used Page_Render -> and my code is like .... Id.Visibilty = false; for each field i want to hide.

If you want to change the Parent Value for different UserLevel, try to add a filter for the Lookup table for the Parent Field (but make sure the Lookup Table has the desired value for the filter). Read Lookup Table -> Filter in help file for more detail.
**i already set the field "fk_TableOneId" as "SelectList" and checked "use Lookup Table" option to link to another Table with "Table Name = TableOne" and "Link Field = Id" and Display Field #1 = "TableOneName" .. THIS IS FOR TABLE NUMBER TWO

my database is like this ..
Table No.1 Fields .. int Id string TableOneName
Table No.2 Fields .. int Id string TableTwoName int fk_TableOneId
Table No.3 Fields .. int Id string TableThreeName int fk_TableOneId int fk_TableTwoId

values for table one are {1,2,3,4,5}
I have a Dependency SelectList for fk_TableTwoId using "ParentFilterFields = fk_TableOneId"
when i choose different values from TableOneName it CHANGES the values shown in the SelectList for fk_TableTwoId in Table No.3

for Administrators i set Visibility of the Table no1 Id.Visibilty = true;
for different user roles visibility is FALSE.

My Question is ... how to display Child Values for fk_TableTwoId with my Parent Value for fk_TableOneId is set to {1} ??


Webmaster
User
Posts: 9430

Post by Webmaster »

is there a way to hide the parent SelectList using UserLevels and display child droplist as if i'm chosing a certain value from the original parent list that i hid ?? , a value for each UserLevel i mean.

Easier to just set a default value for the parent field for different user levels and set the field to ReadOnly. The user can still see the parent field but will not be able to modify it. The child fields can then be populated properly based on the parent field value.


abdeen26
User
Posts: 3

Post by abdeen26 »

Easier to just set a default value for the parent field for different user levels and set the field to ReadOnly. The user can still see the parent field but will not be able to modify it. The child fields can then be populated properly based on the parent field value.

how to do that??


Webmaster
User
Posts: 9430

Post by Webmaster »

Easier to just set a default value for the parent field for different user levels and set the field to ReadOnly

Example:

if (CurrentUserLevel() == ...) {
<Field>.CurrentValue = <Default Value>; // Set default value
<Field>.ReadOnly = true; // Set field to read only
}


Post Reply