Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Highlighted
Respected Contributor.. TheRealJerjef Respected Contributor..
Respected Contributor..
678 views

Adding Additional Fields to WebDrawer Cataloguing Page

Jump to solution

I've created a new record cataloguing page in WebDrawer 9.1 without issue, but I am having difficulty adding additonal fields to the form.  I've tried adding them to a number of property sets in hptrim.config, but still no luck.  This is the error that's thrown to me.

Compiler Error Message: CS0117: 'HP.HPTRIM.ServiceModel.PropertyIds' does not contain a definition for 'Status'

Here's what I have so far in my page.cshtml file.

@{
ViewBag.Title = "Create and Upload a Document";

var recordTypes = this.TrimHelper.Search<RecordType>(
BaseObjectTypes.RecordType, "usable",
pageSize: 100, properties:new string[]{"Name"}, sortBy:new string[]{"Name"});

ViewBag.RecordContainer="12310/0/-10";
ViewBag.RecordRecordType="Service Call Ticket - USE THIS ONE";
}

<form class="trim-form" method="post" action="~/Record" enctype="multipart/form-data" style="margin-left:20px">
<input type="hidden" name="Continue" value="Record?q=uri:{0}" />
<fieldset>
<legend>Service Ticket</legend>
<label>Status</label>
<input name="@PropertyIds.Status" />
<input type="hidden" name="@PropertyIds.RecordRecordType" value="@ViewBag.RecordRecordType" />
<label>Details of Issue</label>
<input name="@PropertyIds.RecordTitle" />
<input type="hidden" name="@PropertyIds.RecordContainer" value="@ViewBag.RecordContainer" />
<label>Files:</label>
<input type="file" name="Files" multiple="multiple" />
<button type="submit" class="btn">Submit</button>
</fieldset>
</form>

 

0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

Re: Adding Additional Fields to WebDrawer Cataloguing Page

Jump to solution

PropertyIds is an enum for the stock properties (things like Title, Number etc).  To put an additional field on a form just use its Search Clause Name which is usually the name minus spaces, see the native client to verify the field's search clause name.

 

<input type="text" name="RoadSurface" />

Blog | Samples | HPE CM 9.3 SDK Docs
**Any opinions expressed in this forum are my own personal opinion and should not be interpreted as an official statement on behalf of MicroFocus**
0 Likes
2 Replies
Micro Focus Expert
Micro Focus Expert

Re: Adding Additional Fields to WebDrawer Cataloguing Page

Jump to solution

PropertyIds is an enum for the stock properties (things like Title, Number etc).  To put an additional field on a form just use its Search Clause Name which is usually the name minus spaces, see the native client to verify the field's search clause name.

 

<input type="text" name="RoadSurface" />

Blog | Samples | HPE CM 9.3 SDK Docs
**Any opinions expressed in this forum are my own personal opinion and should not be interpreted as an official statement on behalf of MicroFocus**
0 Likes
Respected Contributor.. TheRealJerjef Respected Contributor..
Respected Contributor..

Re: Adding Additional Fields to WebDrawer Cataloguing Page

Jump to solution

Thanks so much! That worked.  I can't believe how simple that is.  I spent so much time overthinking this issue and never bothered to use the search clause name by itself.  As always you're a god in the Webdrawer world.

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.