Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a transaction data set that has a from and to country and I have a scenario where my business rules say that a user can see any transactions from a certain number of countries.
I have it set up where a user can see transactions from US, CANADA, MEXICO and it works great when I go against the From Country Field. How do I also perform the data reduction against the To Country field using the same access country list? It would great if it performed an OR when I do both columns but it is performing an AND.
Thanks in Advance.
Hi @cwhite,
Qlik Sense currently does not support direct OR logic within Section Access, the solution involves creating a combined field that captures both "From Country" and "To Country" access.
// Create combined Access Country field
TransactionsWithAccess:
LOAD
TransactionID,
FromCountry,
ToCountry,
FromCountry & '-' & ToCountry AS AccessCountry,
Resident Transactions;
// Section Access configuration
Section Access;
LOAD * INLINE [
ACCESS, USERID, ACCESSCOUNTRY
ADMIN, ADMIN, *
USER, User1, US
USER, User1, CANADA
USER, User1, MEXICO
USER, User2, US
USER, User2, UK
];
// Load the data with access rules applied
Transactions:
LOAD
TransactionID,
FromCountry,
ToCountry,
AccessCountry,
Resident TransactionsWithAccess;
DROP Table TransactionsWithAccess;
**********Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.********
Hi @cwhite,
There is a great article of one of the founders of Qlik that talks exactly about your problem and how to solve it: Data Reduction Using Multiple Fields - Qlik Community - 1474917
Next, read this article: Basics for complex authorization - Qlik Community - 1465872
Be patient, the solution for your problem are there.
Learn more from this master here: A Primer on Section Access - Qlik Community - 1465766