Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

show items description on detail view

Status
Not open for further replies.

madhuusa

IS-IT--Management
Oct 5, 2006
93
US
Hello All,
We have a requirement in which, for all users or a subset of users, the show descriptions on detail view checkbox should be checkmarked.

This option is under Tools-->Settings route.

I looked at the admin settings and also at browseview.html under webnode but could not figure it.

Thanks, Madhu
 
I think I can give you some pointers sinec I think you know oscript and weblingo.Not tested just some ramblings
If you look at the page source
Code:
<FORM NAME="SettingsForm" METHOD="POST" ACTION="/livelink/llisapi.dll" ENCTYPE="multipart/form-data">
<INPUT TYPE="HIDDEN" NAME="func" VALUE="Personal.Settings">
<INPUT TYPE="HIDDEN" NAME="tab" VALUE="1">
<INPUT TYPE="HIDDEN" NAME="cacheid" VALUE="0">
<!-- File: settingsgeneral.html -->

This kind of tells me that when the form is submitted to a RH called Personal.settings in the home module.
So the weblingo you need is probably settingsgeneral.html and personal_settings.html under home module.If you put a break in it should show you the things that you are looking for.

At this point I beleive you can trace the code and most likely there is a default setting for any user that has not used this form and once a user has
pressed submit a row will be created in kuafprefs for that preference.I say this because I did the same thing to turn on another checkbox in the workflow settings which was settingsworkflow.html.

I hope you have luck and keep us posted if these hints were helpful




Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Hello AppNair,
Thanks for the inputs.

1. I thought of changing the checkbox to checked but it will not serve any purpose as kuafprefs row will not be inserted and also it will be checked always no matter what the user did with it.

2. So smartly(!!!) I executed the following stored procedure. The requirement was that for 150 users (out of couple of hundred) the checkbox should be checked and the item details should be visible. Out these 150 users couple of them had played with the preference so had an entry in kuafprefs. My idea was to manually update the General row and if it works use insert/update to take care of the rest.

3. When I did this, it correctly changed the itemdescription to true. But when I come to the web browser, the web browser gets totally confused. Sometimes it shows item details and some times it does not. You have to do crazy ctrl+f5 many times to see the item details and same with the personal-->settings checkbox also.
/* stored procedure to update the personal preference value*/

create proc updatepref as
set nocount on

DECLARE @ptr binary(16)
declare @pos int
declare @id int
declare @otxt varchar(1000)
set @otxt = 'false'
declare @ntxt varchar(1000)

set @ntxt = 'true'
declare @txtlen int
set @txtlen = len(@otxt)
begin
select
@id=prefsid,
@ptr=textptr(prefsvalue),
@pos=charindex(@otxt, prefsvalue)-1
from
kuafprefs

where
prefsid = 18780
and
prefskeyword = 'General'
print @ptr
print @pos
updatetext
administrator.kuafprefs.prefsvalue
@ptr @pos @txtlen @ntxt
end
GO

My question is: Why am i facing the problem in step 3 above. Should'nt inserting in kuafprefs take care of the issue. Or overriding the GeneralSettngsCallback in Home module is the only good solution.

-Madhu
 
Well for one thing you probably should stay away from
livelink direct table updates even if you think you
know the logic.Fisrt try if there are lapi methods ,
secondly try oscript methods and only as a last resort
should one touch the schema.In any case it looks
like livelink is using bitwise arithmetic(it always uses that) so if you are in a binge I would find one row or user's general setting that you like.
Code:
select prefskeyword,prefsvalue from kuafprefs a where a.prefsid=6686
PREFSKEYWORD~PREFSVALUE
General~A<1,?,'dftStartPage'=1,'itemDescription'=true,'modIndDuration'=7,'newIndDuration'=2,'useJava'=true,'viewType'=0>~
PerformQueryWithACL~A<1,?,'ratio'='G1','userNumberOfPercents'='2','userPercentGood'='G2'>~
Now I would devise an insert or update based on this candidates value something where you do like

update my_table set value1="my first goodvalue coming as select from a subquery" set value2=="my first goodvalue coming as select from a subquery"

And I would make oracle handle this that is the resason of the subselect because the "<" etc can be interpreted wrong sometimes as strings

Please search for suitable oscript methods that is IMHO



Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
I stand corrected if it is an assoc I don't think there is bitwise arithmetic involved.After all bitwise can be performed only on numbers !!!!

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top