initial value for slice column

Hi all,  I have a master note table as below

Phong_Lam1_2-1644336796233.png

 

From that master note table I create 3 slices, Customer note slice, member note slice and log note slice,  I ref_rows those 3 slices with table customer, member and log. to add note (inline view note slice)..

Phong_Lam1_1-1644335959891.png

How this column Note category automatedly filled according to It's slice when I add new note ? For example If I add note on Log , then note category should be automatically filled "Log", the same with customer and member there should be "customer" and "member". 

FYI: ID member (note editor) should always have value, I use useremail() and lookup fomula to member table to find the Id member

I tried with this expression on [Note category] but not work, It's always return "customer"

ifs(
count(Master Note[ID Customer])>0,"Customer",
count(Master Note[ID Log])>0,"Log",
and(count(Master Note[ID Members])>0,
count(Master Note[ID Customer])=0,
count(Master Note[ID Log])=0
),
"Member"
)

Thanks

 

 

Solved Solved
0 2 335
1 ACCEPTED SOLUTION


@Phong_Lam1 wrote:

How this column Note category automatedly filled according to It's slice when I add new note ? For example If I add note on Log , then note category should be automatically filled "Log", the same with customer and member there should be "customer" and "member". 


Since each Slice requires its own view, you use the CONTEXT() function to identify which view is being used when entering the note.  something like this (note that the views names are just place holders...you will need to use your actual app view names):

IFS(
    CONTEXT("View") = "Customer Slice View Name", "Customer",
    CONTEXT("View") = "Member Slice View Name", "Member",
    TRUE, "Log"
)

 

View solution in original post

2 REPLIES 2


@Phong_Lam1 wrote:

How this column Note category automatedly filled according to It's slice when I add new note ? For example If I add note on Log , then note category should be automatically filled "Log", the same with customer and member there should be "customer" and "member". 


Since each Slice requires its own view, you use the CONTEXT() function to identify which view is being used when entering the note.  something like this (note that the views names are just place holders...you will need to use your actual app view names):

IFS(
    CONTEXT("View") = "Customer Slice View Name", "Customer",
    CONTEXT("View") = "Member Slice View Name", "Member",
    TRUE, "Log"
)

 

Thanks @WillowMobileSys , that's working

Top Labels in this Space