I have an xpage called:
content.xsp
The datasource is called Content.
I have a field called link_cat that I am trying to retrieve the current value from and use for a DBlookup on the field link_cat_sub. This is the code that I have at the moment but for whatever reason I cannot get it to work for the life of me.
Thoughts?
var cat = Content.getItemValueString(“link_cat”);
@DbLookup(@DbName(),“categories”,cat,2)
I know the @DBlookup is working because I replaced the cat with hard coded text and it works.
Subject: When is the value for ‘link_cat’ set?
Also have a look at this - http://www-10.lotus.com/ldd/nd85forum.nsf/5f27803bba85d8e285256bf10054620d/a053f6a28ebe18c585257592002e6700?OpenDocument
Which I’m guessing you have since you know about that Designer bug
Subject: RESOLVED
I figured it out. It had something to do with the partial update. Kinda just started working after some serious tinkering.
Subject: Still having problems
I determined that it might partially be to a domino designer bug. That wont allow you to set the values to compute dynamically.
So i tried the work around to change the $ to #:
<xp:comboBox id=“link_cat_sub”
value="#{document.link_cat_sub}">
<xp:selectItems>
<xp:this.value><![CDATA[#{javascript:var cat = document.getItemValueString("link_cat");
@DbLookup(@DbName(),“categories”,cat,2)}]]></xp:this.value>
</xp:selectItems>
</xp:comboBox>
This still does not work.
Even when i try to create a computed field with formula:
<xp:text escape=“true”
id="computedField1">
<xp:this.value><![CDATA[#{javascript:document.getItemValueString("link_cat");
}]]></xp:this.value></xp:text>
I still get nothing at all.