How to display the name of the last user who modified my Custom Domain Object in Petrel RPT? - ocean

What do I need to do so that the RPT window display the name of the last user who modified my custom domain object (and the date)?
On my DomainObject, I've implemented a LastModified property of type LastModifiedInfo but it doesn't seem to be enough.
How can this be done?

If you implement IHistoryInfo it will show the last record of the history in the RPT dialog.

Related

When the user clicks a text box on my form, I need to assign an ID to the current record if there isn't one already

I have a form, frmEvent, for editing and creating records. Each record represents an Event. I have a pop-up form that displays the many-to-many relationships that associate one or more Persons to the current Event. This pop-up form is opened when the user clicks a text box on frmEvent.
The pop-up form displays all of the records in tblEventPersons where EventID = the ID of the Event record that is currently open. This normally works great. However, when my form is used to create a new Event record, Access does not assign an ID for the new Event record until at least one field has been changed. If a user creates a new Event record and tries to immediately open the frmEventPersons form, they get an error because the new Event record does not yet have an ID assigned.
I'm sure there's a very simple solution to this, but my searches have not yielded anything useful.
Well it is assumed that the main form has a record, and has some data and has a "ID" as you well asked.
However, if the form is moved to a new record, and you want to launch that next form that requires and needs the current forms ID that as you WELL note has not yet been generated?
Well, keep in mind that you current form WILL IN FACT generate the ID (assuming a auto number PK id column) if the current record has been "dirtied". We thus assume that the current record had SOME data editing. If it has NO EDITING done, then it actauly turns out is a bit of a trick to get Access force feed and generate that ID.
About the MOST easy way?
Dirty some field/column in the current form.
eg:
if isnull(me!ID) then
' this record does not yet have the PK id
' dirty some bound control.
me.MyEditDate = date()
end if
me.Dirty = false ' this will force a recrod save - gereate the "ID" you want.
docmd.Open "frmDetails",,,"FKColumn = " & me!id

Save a user popup selection in a custom Automator Action

Using Xcode 5.* for a cocoa-applescript automator action.
Interface is a a simple popup menu that gets populated using an outlet with:
tell thePopupMenu to removeAllItems()
tell thePopupMenu to addItemsWithTitles_(theList)
When the action is used in a workflow (a Service actually), I want the next time it is run and the action dialog shows up (I will have "Options:Show when run" selected), I want the popup menu to change the selection to the last one that was selected. Right now, the default first item shows, even though last time it was run, the user selected a different item in the popup menu.
My thought was that I need to capture a change in the popup menu with a Sent Action handler, and then set some type of default. I have a working handler:
on thePopupMenuSentAction_(sender)
set popupValue to (popupSelectedValue of my parameters()) as string
-- save this selection somewhere???
end
What's the right way to save this? Do I use User Defaults? My Bindings are currenly all tied through Parameter object/controller. If I should use User Defaults, can someone give example code for setting up User Defaults, and then how to get and set a new value using Cocoa-Applescript?
If I can get the name string of the menu item saved somewhere, I can get the string and then change the selection of the popup menu in the
on opened {}
-- set up the action interface
end
handler which gets called just before the action is displayed each time.
Thanks for any help,
Joe
I did mine a bit differently. I will assume you are referring to what XCode calls a "pop up button" (somewhat misleading). I did not use the parameters at all, although that is probably better for larger projects. Have a look at the code:
script Insert_Picture_into_Powerpoint_Slide_Show
property parent : class "AMBundleAction"
property menuChoices : {"Insert a Beginning", "Insert at End"}
property menuSelection : missing value
if (menuSelection as string) is "missing value"
set menuSelection to 0 as integer -- sets default value
end if
end script
I bound Content Values to File's Owner and under Model Key Path I put menuChoices.
Then you just bind the Selected Index to File's Owner and for the Model Key Path type menuSelection.
Defaults
On the initial run, if the user does not click anything, the menuSelection will be missing value. Because I couldn't find a way around this, I created a conditional which tests for this and sets it to the first choice by default (the one that is shown when you add the action).
When the user selections one of the menu choices, the choice is remembered on sequential runs.

Add link to contacts in outlook Appointment Module Form using custom fields

I'm a long date leecher of this site... this is the first time I'm not able to find a response (Google didn't help too).
Well, what I am trying to do is to add an active link to a contact to a custom field in an Appointment Module Form.
I can put the address I want in the appointment custom fields using this code (vb.net):
Dim extendedPropertyDefinition = New ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings, "MyField", MapiPropertyType.String)
item.SetExtendedProperty(extendedPropertyDefinition, "address#iwant.com")
I am able to view MyField using a custom field in my Appointment Module Form.
Setting "To" field to the value (in custom field properties) i can transform the e-mail into the corresponding contact name (obviously if it exists in contacts list).
Here comes the trouble:
I would like to add a link to contact card when clicking the contact name.
I don't really know if it is even possible...
Thank you very much for any help... "It is not possible" will be an appreciated response too.

Syntax for SharePoint 2010 BCS URL Action to populate New form

Have seen several posts with solutions for native SharePoint lists, including the very useful SPUtility.js (only for native SharePoint lists). But nothing to pass a value from a BCS list to a new BCS list. The Query string filter will not connect on the New form (no web part to connect it to) and does me no good on the lists page (already have that working).
A "go write custom code for everything" is not a solution for me.
There should be a way to 1) pass the value in the URL (ideal - what's the syntax?) or 2) make some other simple change, perhaps to the select list for the item -- I just can't find it. Have seen quite a few posts with similar questions. The Microsoft documentation is not useful and there are more questions on the "social" topics than answers.
Here's what I have:
I have a BCS list (sends item) tied to a BCS related list (receives item).
I have an action on the related list (ECT) to create a new item. Works fine with no parameters. I get a blank new form. The new form allows me to enter two items and choose two items (exactly as intended).
What I would like to have is the necessary ?something=something string so that my user does not have to select one of the choice items (MNumber - set as a key / required value)
User selects "New" from Actions.
Form Opens
MNumber is automatically filled in based on the MNumber of the current item displayed in the BCS related list.
The string I supply is accepted. Does nothing.
/intake/Lists/ContactsList/NewForm.aspx
/intake/Lists/ContactsList/NewForm.aspx?MNumber=1234
The string I supply is rejected - cannot be saved or insufficient values.
/intake/Lists/ContactsList/NewForm.aspx?MHICNumber={$MHICNumber}
Have also tried passing a string to one of the text fields (instead of the select field). Can't get that to work either. I've spent quite a few hours with the various boards. Nothing helpful.
Would also be nicer if I could set the New form to display in a pop-over window (as it does when I select New from the list view). Opening a new browser window is hokey and replacing the existing one is a navigation pain for the user.
Have this working ... Thanks to Kit Menke!
Created an Action on the External Content Type in the BCS....
/intake/Lists/ContactsList/NewForm.aspx?IDnumber={0}&Source=/intake/scheduling.aspx
where
parameter property 0 is the IDNumber from the ECT
The NewForm.aspx was edited to add a hidden content editor web part with references to three scripts Kit wrote - two supporting and one that sets the values.
http://site/list/NewForm.aspx?toolpaneview=2
User selects the Action on the displayed ECT list
Action uses the URL to go to the New page with the data
Kit's script adds the data to the form and puts in the date and time.
Note: The ID field needs to be a text field. Cannot be a selection list.

get list name in sharepoint 2010

how to get current used list name. my scnerio is: i have a list said config. i have create one column say "test" whose datatype is "Managed Metadata". now after add this column.now when i edit this item and click on icon near to "test" column one dialog is open which is webtaggig.aspx something like that.
now, i had open my custom control in this page. when page opened , my control is loaded.
now on my custom control page load i want to get the list name programatically.
can any one suggest me how can i do this?
Have a look at the SPContext object. You would need something like SPContext.Current.List.Title to get the name or title of the current list.