Focal Point
[SOLVED] Inserting USERNAME in the synonym

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6407075096

July 18, 2018, 07:38 PM
NewBee...WF8
[SOLVED] Inserting USERNAME in the synonym
Hi All,
Any advise is appreciated. Thank u in Advance.

Scenario:
I have insert a column in my Synonym where the column gives me the user name.

I can achieve this via a .fex with -TYPE &IBIMR_user.

But, my question is how do I get the same information (user name) in my synonym (@Meta data Level).

Thank you once again.

This message has been edited. Last edited by: NewBee...WF8,


WebFOCUS 8
Windows, All Outputs
July 19, 2018, 04:29 AM
Frans
What is your usecase, do you want to show the user that is loggedon in the report?


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
July 19, 2018, 07:41 AM
MartinY
If the user name is not already part of the data it cannot be shown except if you add it.
As per below I add the user name to a new file but it's at run time only since &IBIMR_user only exist at run time.
And depending of the desired result, it can be done from a DEFINE or COMPUTE.

DEFINE FILE CAR
DEF_USR /A30V = '&IBIMR_user.EVAL';
END
TABLE FILE CAR
PRINT CAR
      DEF_USR
      COMPUTE CMP_USR /A30V = '&IBIMR_user.EVAL';
BY COUNTRY
ON TABLE HOLD AS TMP
END
-RUN

TABLE FILE TMP
PRINT CAR
      DEF_USR
      CMP_USR
BY COUNTRY
END
-RUN



WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
July 19, 2018, 07:44 AM
BabakNYC
You can set an &&VARIABLE in an MFD_PROFILE.

https://webfocusinfocenter.inf...ang/source/ids24.htm


WebFOCUS 8206, Unix, Windows
July 19, 2018, 03:10 PM
NewBee...WF8
I am trying this scenario in InfoAssist+. Please help


WebFOCUS 8
Windows, All Outputs
July 19, 2018, 03:59 PM
BabakNYC
Edit the synonym your user is going to use in InfoAssist and add the following expression to it:

  
   DEFINE UID/A66=CNCTUSR('A66');
    TITLE='User ID', $


This will make a field called UID available to them in InfoAssist. UID will be the id used to log into the Portal.


WebFOCUS 8206, Unix, Windows
July 19, 2018, 08:14 PM
NewBee...WF8
quote:
BabakNYC

Thank you for suggesting me the solution. I did exactly as you said. Edited the synonym and added the define code and saved it.
Viewed the sample data I get the new column with my username. But, when I try to create a report off of this synonym on the client side it gives me an error: "(FOC1354) ACCESS FILE RECORD ABSENT, WRONG OR INCOMPLETE FOR SEGMENT:"

Need your help on this as well, thank you.


WebFOCUS 8
Windows, All Outputs
July 19, 2018, 08:55 PM
FP Mod Chuck
Newbie

Make sure there is a .acx file with the same name as the .mas file. If it is missing recreate the synonym


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
July 20, 2018, 07:55 AM
BabakNYC
If you used the text editor you might have added the DEFINE in the wrong place in the master. Remove the text you added and open the master file with the GUI tool on the Reporting Server. Then insert the DEFINE using the GUI which will place it where it belongs.


WebFOCUS 8206, Unix, Windows
July 23, 2018, 03:49 PM
NewBee...WF8
quote:
BabakNYC

Thank you BabakNYC, your solution worked. Thank you much for all your help.

Thank you FP Mod Chuck, MartinY, Frans for your responses.


WebFOCUS 8
Windows, All Outputs