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!

Add item to fQueryString

Status
Not open for further replies.

cdfly

Programmer
Jun 16, 2010
68
US
Hello,
I am trying to add a dynamic parameter to the fQueryString to a custom module. Can someone give me an example how to do this?
I tried just appending the parameter e.g .fQueryString+='&d=21'

but when I do that each time the module is called then another parameter is appended, when I open the module in the builder that fQueryString has been changed to include the parameter.Is there a way to use the Str.Format function?


Thanks

 
cdlfy,
you need to test to see if the parameter is already there before you add it, if it is simply update the value, that is probably why you are getting duplicates of the change as you imply.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
Thanks ggriffit,
Maybe I should ask this, I'm trying to create a cache using the $LLIApi.CacheUtil.New and then be able to pass the objectID so I can add and retrieve data from the cache. Do you know the best way to pass the cacheID around? I'm used to java, and c# which has a session object.

Thanks
 
Usually when you do want to create persistence all you have to do is to create a new feature most programmers call it fData If you do it at the RH object itself then when you subclass it for other RH's the .fdata is available.I declare it as a dynamic and then append whatever I need to it.In your case whatver cacheid you got from your call
$LLIApi.CacheUtil.New you can do something like
.fdata.mycacheid=$LLIApi.CacheUtil.New()

in my code then I call whatver I need to get form the cache object something like

checkVal = $LLIAPi.CacheUtil.Load( prgCtx, .fdata.mycacheid )

Forgive me I am cutting and pasting bits and pieces of code form what I have used,pls just understand the concept.You are free to add your own objects to any RH or oscript object and manipulate it for your benefit..fData is a frequent way of doing it


Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Thanks appnair. I will give that a try when I get back to the shop
 
Thanks for the code appnair that seems to be what I need. So I guess I really don't need to use the $LLIAPi.CacheUtil to persist the session data, I can just use the .fdata feature?

Thanks
 
Hi cdfly,
You use a cache when you want persistence of something from a livelink databases. As you know a livelink system can be constructed off a single database with usual FE threads of 5 each and a lot of vertical and horizontal servers to augment the load of the system. RH's by nature are not thread safe(each thread holds its own values) so if there is something that you want to use to approximate that you will use a cache object.This e.g will probably help you fathom it.OT has a permission pusher.assume I start pushing permissions on a node and its child items,and I do it 10 at a time.There is no guarantee that the same RH thread gets it all the time,so if you look closely in the Ot code you will see that the post request contains a cacheid,that cacheid is used to create a nodecrawler from scratch it is the first time or subsequent requests continue from where we left off.even if the livelink server was re-started so long as the browser could be pushed and if the cache object is available,it will faithfully process the rest of it.I use cache objects when I have to do long running ops otherwise you could just write the status to a file and treive it.Hope that is somewhat clear.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Hi appnair,
Yep, that helps a lot thanks for all your help.
 
Awesome, thanks for the link ggriffit looks like your site has some great tutorials
 
I have one more hurdle using the $LLIApi.CacheUtil. In our mod we post some data and while the data is being processed it saves the process information at different steps to the LLIApi.CacheUtil. At the same time I'm making JSON calls to another RH in the mod to get the process info out of the LLIApi.CacheUtil and display it to the user. When I try to get the data out of LLIApi.CacheUtil it fails because there's no prgCtx. Does the RH need to get posted to have a prgCtx? Or is there a have to persist the prgCtx and then pull it back out and use it?

Thanks
 
Please disregard my last post. Looks like I.E was caching some old code once I cleared it out I can get access to the prgCtx that I persisted. Sorry for all the post too
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top