Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
We have a master app secured using section access. We are planning to use ODAG to generate apps to dig deeper in the data. To save on load time, would it be possible to know the authenticated user when loading the ODAG app so that we don't have to load all of the data and then filter out most of it with section access? If I was able to know who is connected, I would be able to load only the necessary data.
Thanks
I found that I can get the active user by using SubField(OSUser(),'=',3);
But if I execute this in the ODAG app, the user is 'sa_api'. Can I pass the user somehow from the master app to the ODAG app?
Hi,
you have to create a table with users list (USERID, USERNAME fields) in aggregated app which will be automatically filtered by section access. Then in the detail app, create an odag variable like :
SET USERNAME = ;
SET USERNAME = $(odso_USERNAME);
SET USERNAME_COLNAME='USERNAME';
Let vUSERNAME = Replace($(USERNAME), 'CHR(39)', '');
This variable will contain your userID value (for example: john.doe) to use as a filter in where conditions or wherever you need it.
Alessandro
Hi!
Thanks for your reply!
But I can't tranlate User_id from aggregation app to detail app.
Could you explain in more detail?
Hi,
what value do you get in detail app for username variable?
Alessandro