Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a straight table with a dimension CUSTOMER_CODE. For some CUSTOMER_CODE I also have a GROUP_NAME, but not all of CUSTOMER_CODE are part of some GROUP_NAME.
What I need is:
-if user selects a GROUP_NAME, all CUSTOMER_CODE of this GROUP_NAME should appear in the straight table.
-if user selects a single CUSTOMER_CODE and it is part of a GROUP_NAME, all CUSTOMER_CODE of this GROUP_NAME should appear in the straight table.
-if user selects a single CUSTOMER_CODE and it is NOT part of a GROUP_NAME, only one row will be shown in straight table (the row of selected CUSTOMER_CODE).
Exception: if user select more than one CUSTOMER_CODE and/or more than one GROUP_NAME, I've already set a custom error message.
Maybe relevant: CUSTOMER_CODE and GROUP_NAME are in the same table CLIENTS.
Any idea on how to make this?
Thank you in advance.
Henrique
Hi,
you could achieve this with action in document :
action 1 on selection field customer_code :
select in field group_name the value : only({<group_name = P({$} customer_code) >} group_name)
action 2 on selection field customer_code :
deselect field value : = if(count(group_name)>0,'customer_code')
it should do what you want
regards
Hi,
you could achieve this with action in document :
action 1 on selection field customer_code :
select in field group_name the value : only({<group_name = P({$} customer_code) >} group_name)
action 2 on selection field customer_code :
deselect field value : = if(count(group_name)>0,'customer_code')
it should do what you want
regards
Olivier,
I did some changes on requirements and created a button to execute actions suggested by you.
Thanks for your help.
Henrique
thanks Henrique,
good dev