The solution was “$AO.” missing : contract IN(SELECT contract FROM &AO.USER_ALLOWED_SITE where userid = (select &AO.fnd_session_api.get_fnd_user() from dual ))
@JohanLindstrom According to my firt tests, it seems to work like I wanted.Thank you again 😀
I think I was not clear because it is possible to filter with multiples site in the lobby page.With the formula given by Ashok in this topic, it works :AND CONTRACT IN ( select regexp_substr('$SITE$','[^,]+', 1, level) from dual connect by regexp_substr('$SITE$', '[^,]+', 1, level) is not null ) My concern is to combine the filters with the conditions I wrote in my previous reply.
Thank you very muck both of you ! I just added ‘’ around $COMPANY$ and it works great. After reading your answers, I have two questions : Where do you find the “&AO.SITE” in your request ?If I look on the system info on the site menu, I find this :It will help me for other request. Our customer still want to be able to filter by site if necessary. For the moment, the condition is : and contract like '$site$' It works well, you can write 1 site or “%” to obtain all sites connected to the user.But another request from them is to be able to filter with multiple selected sites… I found on the forum this topic :AND CONTRACT IN ( select regexp_substr('$SITE$','[^,]+', 1, level) from dual connect by regexp_substr('$SITE$', '[^,]+', 1, level) is not null )And the solution works well if you write multiple site separated with “,” but if you try “%” it does not work. In conclusion the optimal solution for my customer would be :You have two filters : Site and Company If a company is prov
Hello @Link I give you an exemple to be clear.We have 2 companies with multiples sites associated :C1 S1 S2 S3 S4 C2 S5 S6 S7 S8 In the lobby, the goal is to filter with all sites from C1. At the moment, our customer has to :Filter with the first site, write the result and so on with the other sites With another SQL formula, he can write in his filter “S1,S2,S3,S4” and it will work but it is not a solution because they do not want to write all sites each time they come the lobby So the idea is to have like you show a filter “Company” but in the SQL condition, it will find all sites associated to this company to make the filter. Because the field “Company” is most of the time not available in the logical unit from the lobby element. For instance :I want to see my customer orders from all sites of the company C1.The idea is to write “C1” in the “Company” filter and it will search all customers orders from sites S1,S2,S3 and S4.
Already have an account? Login
No account yet? Create an account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.