Highlighted
Absent Member.
Absent Member.
756 views

I'm having problem with scripting and need some help


I'm writing a script to find a user in the user database. The script is below: The value of SEL_FIELD1 is TS_ID. So I'm trying to say when the TS_LOGINID equals the VISN1VideoSchedulers then I want to get the TS_ID assocated to that login id. When this script runs I'm getting an error that reference the VISN1VideoSchedulers like it is the column name in the table. Any help would be greatly appreciated.
Dim v1, v1rec, v1x, v1y, v1tsid
v1 = Ext.TableID("TS_USERS")


Set v1rec = Ext.CreateAppRecord(v1)


v1x = "TS_LOGINID = "&"VISN1VideoSchedulers"

v1y = v1rec.ReadWithWhere(v1x)


Call v1rec.GetFieldValue(SEL_FIELD1, v1tsid)



0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

Re: I'm having problem with scripting and need some help


Jerry,
I would write the value of v1x to the event log after you set it just to see if it's set how you're expecting. Just guessing that your quotes are getting messed up.
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: I'm having problem with scripting and need some help


Jerry, In this line here, it appears that you are trying to check if ts_loginid=VISN1VideoSchedulers.v1x = "TS_LOGINID = "&"VISN1VideoSchedulers"
However, VISN1VideoSchedulers should have single quotes around it in SQL. So, the line should look like this: v1x = "'TS_LOGINID = "&"VISN1VideoSchedulers'"

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: I'm having problem with scripting and need some help


As suggested a Call Ext.LogInfoMsg("v1x = " & v1x) would help show what the error is or a Shell.RedoMessage = v1x if that's easier. The problem is certainly with the quotes tho' and it should read v1x = "TS_LOGINID = '" & VISN1VideoSchedulers & "'" so you end up with single quotes surrounding the login id
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.