Note that there are some explanatory texts on larger screens.

plurals
  1. POConcatenating parameters
    primarykey
    data
    text
    <p>I'm trying to concatenate a string in Expression Language to access a property of an object and failing to do so.</p> <p>Within an XPage in Lotus Notes, I want to programatically select which field to which I want to bind the control on the current XPage.</p> <p>The result I would like to achieve is as follows.</p> <pre><code>#{poDoc[advertisingDateStart];} </code></pre> <p>I have a variable named fieldName that would supply "advertisingDate" and simply want to append "Start" to this field and "End" to the end date field. I tried several variations that do not work, such as:</p> <pre><code>#{poDoc[fieldName{'Start'}];} </code></pre> <p>Note that it would work if I passed in "advertisingDateStart" and used </p> <pre><code>#{poDoc[fieldName];} </code></pre> <p>The goal is to be able to place a start date field and an end date field while dynamically binding based on configuration documents. That is, adding fields to my XPage using configuration documents and repeats instead of changing the design. Here is one of the ways I tried to create the ending date field:</p> <pre><code>&lt;xp:inputText id="inputText5" style="padding-top:2px;text-align:left"&gt; &lt;xp:this.rendered&gt;&lt;![CDATA[#{javascript:rowData.getColumnValue("FieldType") == "Date Range"; }]]&gt;&lt;/xp:this.rendered&gt; &lt;xp:dateTimeHelper id="dateTimeHelper3"&gt;&lt;/xp:dateTimeHelper&gt; &lt;xp:this.converter&gt; &lt;xp:convertDateTime type="date"&gt;&lt;/xp:convertDateTime&gt; &lt;/xp:this.converter&gt; &lt;xp:this.value&gt;&lt;![CDATA[#{javascript:poDoc[fieldName+"End"];}]]&gt;&lt;/xp:this.value&gt; &lt;/xp:inputText&gt; </code></pre> <p>I just can't figure it out.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload