I have one Parent table (named "Urunler") whi...

I have one Parent table (named โ€œUrunlerโ€) which has key field as โ€˜idUrunโ€™ and lots of other columns including โ€˜idUserEmailโ€™ column. and Child table which has key value as โ€˜idDosyaโ€™ and has reference to parent via โ€˜idUrunโ€™ column

How to make a Child Table โ€˜Read Onlyโ€™ dependant on the values in โ€˜idUserEmailโ€™ column in the Parent table?

I wrote an expression like this into Child table;

IF( ANY(SELECT(Urunler[idUserEmail], [idUrun]=[_THISROW].[idUrun],))=USEREMAIL(),

โ€œADDS_AND_UPDATESโ€, โ€œREAD_ONLYโ€)

but I receive error for above formula;

0 17 449
17 REPLIES 17

Bitmedi derdin, bitmediโ€‹:joy: SWITCH (USEREMAIL(),

"administrator@mydomain.com","ALL

_CHANGES",

โ€œREAD_ONLYโ€)

SWITCH( USEREMAIL(), ANY(SELECT(Urunler[idUserEmail], [idUrun]=[_THISROW].[idUrun])),

โ€œADDS_AND_UPDATESโ€, โ€œREAD_ONLYโ€ )

The table access is not the correct way because you want to change the access by field value. One possibe option is the Editable_If field.

@Aleksi_Alkio Thanks! Editable_If works ok with my scenario but still want user not to be able to click on โ€˜Newโ€™.

Sometimes you want too much broโ€‹:joy:

If you create an additional REF_ROWS slice and that slice is Read_Only, you can use Show_If expression to show that inline table or not. If you have two separate inline views (one for normal table and one for the slice) you can have the feature you are looking for.

@Aleksi_Alkio I will try and inform after I enjoy beautiful ISTANBUL traffic jam

Hello sensei @Aleksi_Alkio it worked. Ref_Rows to a โ€˜Read Onlyโ€™ slice and setting its Show_If helped me solve my problem. Thanks to you as well dear @Levent_KULACOGLU

Youโ€™re welcome

SWITCH( IN(USEREMAIL(),Urunler[idUserEmail], TRUE, โ€œADDS_AND_UPDATESโ€, โ€œREAD_ONLYโ€ )

@Levent_KULACOGLU Selam รœstad, I got the same error for your formula; SWITCH( USEREMAIL(), ANY(SELECT(Urunler[idUserEmail], [idUrun]=[_THISROW].[idUrun])),

โ€œADDS_AND_UPDATESโ€, โ€œREAD_ONLYโ€ ) โ€ฆ Error in expression โ€˜[_THISROW].[idUrun]โ€™ : Unable to find column โ€˜_THISROWโ€™, did you mean โ€˜Tรผrโ€™?.. โ€ฆ

@Yilmaz_Kandis1 try the last one๐Ÿ˜‰

@Levent_KULACOGLU

When I try the last one; SWITCH( IN(USEREMAIL(),Urunler[idUserEmail]), TRUE, โ€œADDS_AND_UPDATESโ€, โ€œREAD_ONLYโ€ ) It doesnโ€™t give error but it also doesnโ€™t perform what I want.

I have โ€˜Filesโ€™ Child table for each โ€˜Urunlerโ€™. I want the user to add/update Files only if the Urunler is added by the user. In your formula, it compares UserEmail() to whole Urunler[idUserEmail]. If the user has only one record belong to him then for all records he will have Add_And_Updates. Isnโ€™t it?

@Yilmaz_Kandis1 you can assign/revoke access on table level, not on row level

This was the answer I was wishing not to get. Thanks bro!

@Yilmaz_Kandis1 you can achieve a result, provided you use a full slice of your table as per USEREMAIL(), then users can see only their own data. But letโ€™s consult our โ€œMasterโ€ @Aleksi_Alkio, may be he offers something more useful or operational than mine.

@Yilmaz_Kandis1 try this one alsoโ€ฆ SWITCH( USEREMAIL(), [MotherRecordRefColumnName].[ChildRecordEmailColumn], โ€œADDS_AND_UPDATESโ€, โ€œREAD_ONLYโ€ )

Top Labels in this Space