Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I have the following script, but I would like to sort the records by field1, does anyone know how to do this?
RecordStorage storage = new RecordStorage(); Record rec = storage.GetRecord(new Guid(record.Id)); RecordService service = new RecordService(rec); try { RecordField field1 = rec.GetRecordField("field1"); RecordField field2 = rec.GetRecordField("field2"); if(field1 != null) { <option value="@record.Id" @(record.Id == @ruid ? " selected" : "")>@field1.ValuesAsString() - @field2.ValuesAsString()</option> } } catch { }
Kind regards
I'm confused by two things:
What RecordService instance are you using that takes a Record as a constructor overload?
The example code you have shown is focussed around getting a single record - what records are you seeking to sort?
Regards, Chris
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How to loop through records and sort them
Hi,
I have the following script, but I would like to sort the records by field1, does anyone know how to do this?
Kind regards
I'm confused by two things:
What RecordService instance are you using that takes a Record as a constructor overload?
The example code you have shown is focussed around getting a single record - what records are you seeking to sort?
Regards, Chris
is working on a reply...