Event listener in Fiori List line item action - sapui5

I have a requirement where I need to listen to a line item action of Fiori List elements report.
I have embedded Fiori list component 'L' inside a freestyle app component 'F 'because I need to display multiple independent reports in app 'F'.
Compoent F (Freestyle)
embeds component L (List report created from Web IDE List report template).
Component 'L' has a line item action defined upon which I need to update an element which is part of component 'F'. The action is achieved by BOPF action.
The local annotation will be something like below:
`<Record Type="UI.DataFieldForAction">
<PropertyValue Property="Label" String="AddToCart"/>
<PropertyValue Property="Action"
String="some_Entities/actionAddToCart"/>
<PropertyValue Property="Inline" Bool="true"/>
<Annotation Term="UI. InvocationGrouping"
EnumMember="UI.OperationGroupingType/Isolated"/>
</Record>`
How do I know when the action gets completed so that I can update the element value in component 'F'? Precisely, I need to show the number of items in cart after user adds a line item to cart through BOPF action. So I need to capture the action 'completed' event and read the count from OData again.
Regards.
Sumit

Related

react-leaflet-draw - onEditStart/Stop events cumulates when trying to edit multiple featureGroups

I have a React application where a react-leaflet#2.7.0 + react-leaflet-draw#0.19.0 map is displaying multiple FeatureGroup components containing polygons.
On the right end side of the app is a clickable list of the feature groups names.
The groups can be selectively "activated" by clicking the names, so if a feature group is active, the EditControl therein is rendered. Only one group can be active at a time.
My problem
when I switch from one group to another and then click the edit button in EditControl, the onEditStart/Stop events of the previously active group still fire, along with the new ones. The more I switch between groups, the more events are fired.
Update:
The issue seems to be that EditControl is never unmounted, even if upon the parent state change it doesn't get rendered. If I add a random key prop to it, the issue is resolved, but then other issues occur.
I don't yet have a minimal code example to share, but to give you an idea of the implementation here is a schema:
<App>
<Map>
<MapContent id="foo">
<FeatureGroup>
<EditControl />
</FeatureGroup>
</MapContent>
<MapContent id="bar">
<FeatureGroup>
<EditControl />
</FeatureGroup>
</MapContent>
</Map>
<GroupSelector />
</App>
Except App (root component), MapContent (very basic wrapper: checks if the group is active) and GroupSelector (clickable list), all other components are from react-leaflet and react-leaflet-draw.
Flow
On click, GroupSelector updates the state of App to set an activeGroupID (i.e. "foo") and MapContent will render its EditControl only if its id matches the activeGroupID
I hope this description makes sense. Any help would be greatly appreciated!

Mapping parameters from embedded form within a form MSACESS

I am trying to get a query to update based on a value passed from a combo box within the same form. After I moved the form into a tabbed control box within another form it seems to have broken. I've tried mapping from the outer form to the combo box and still an error to provide parameters into the query.
The Outermost form is "workbench"
The tab control is "tabbed_space"
The inner form is "software_list"
The combo box is "cmb_server_selection
I have in the query
=[Forms]![workbench]![tabbed_space]![software_list]![cmb_server_selection]
What am I doing wrong?
Tab controls do not affect the "navigation path" of objects, the objects are still directly on their form.
To get objects on a subform, you need SubformControl.Form!Object
So it should be
=[Forms]![workbench]![software_list].Form![cmb_server_selection]
Note: this is easier to debug in the Immediate Window (Ctrl+g) than in the query (the form must be open of course) :
? Forms!workbench!software_list.Form!cmb_server_selection

How to create "Go To Next" record button in Access Form that references an alternate form

In my Access dB, I have a Form ("frmSearch") with a Subform ("subFrmData") that references a query ("qryDynamicData").
The Main Form has 6 drop downs that filter the data table in the Subform. The combo boxes are cascading so that once you select one, the entries that appear in the remaining combo boxes are only those entries in the query that correlate to the first selection. The goal is to keep making the data in the Subform data table shorter and shorter. Here are the fields in the combo boxes:
Region
Account Executive
Manager
Engineer
Stage
Project Number ("ProjectSLCT")
When the user filters down to where the list of projects they are looking at is small enough, they use the final combo box ("Project Number") to select an entry from the table. Doing this brings up another form ("MPC_ProjectNotes") as a pop-up form where they can keep track of project specifics. The event looks like this:
DoCmd.OpenForm "MPC_ProjectNotes", , , "Project_Number= '" & Me.ProjectSLCT.Value & "'"
I want to create a Next Record button on the "MPC_ProjectNotes" form that would in effect allow them to run through the steps of selecting the next item in the ProjectSLCT dropdown and thereby relaunching the MPC_ProjectNotes form with the next item from the combo box (and from the datasheet in "subFrmData") without having to close the MPC_ProjectNotes form and adjust the combo box.
Any thoughts? I don't really even know what to google to get myself pointed in the right direction on this. It seems "Next Buttons" aren't generally setup to work across forms.
Ok, here is what I would suggest:
In place of launching form MPC_ProjectNotes to ONE reocrd?
Why not launch the form with the SAME criteria and list as your combo box ProjectSLCT.
Now, we would of course land in the first reocrd of ProjectSLCT. but that's probably ok!
Now say if ProjectSLCT was NOT on the first record? Then we would simple have to add one extra step: move the form to the right record.
So, the logic is this:
Launch the 2nd form to the same "list" as the combo box.
Move the 2nd form to the SAME item currently selected in the combo box.
Now, you don't even have to write a next/previous button, but can simple display the built in navigation buttons. Since the form is LIMITED to the same list, then regular navigation in that form will work and work without you having to write any code!
So someplace in your first form, you EVENTUALLY wind up with this:
combobox data source = select * from tblWhoKnows where (CRITERA GOES HERE!!!).
So, now we simple launch the 2nd form with this:
DoCmd.OpenForm "MPC_ProjectNotes", , , (CRITERA GOES HERE!!!)
Now the form is loaded with the SAME list. We just this extra line of code to move/jump the form to the current selected row in the combo.
forms("MPC_ProjectNotes").RecordSet.FindFirst "Project_Number= '" & Me.ProjectSLCT.Value & "'"
So we open the form to the "list", and then jump to the corrent combo box selected. The result is a form that you can navagate teh combo list, but we jump/started out on the same combox selected item from that list in the form.
So the code will look something like this:
DoCmd.OpenForm "MPC_ProjectNotes", , , (CRITERA GOES HERE!!!)
Forms("MPC_ProjectNotes").RecordSet.FindFirst "Project_Number= '" & Me.ProjectSLCT.Value & "'"
You will of course "change" the above "CRITERA" to the SAME criteria you used in your code to fill out the last combo box.

How to have a button change the form within the subform "window" in Ms Access

I need to create my own "navigation" form in Ms Access. Basically, I have a MAIN form that has one field named LotNumSelect
Then, buttons representing each form the user would like to view.
Button1 - Customer
Button2 - Job Data
etc.
Once the customer clicks a button, the procedure would open the corresponding form in the subform window to the record matching the LotNumSelect field.
So far, I have this.
Private Sub ContactInfo_Click()
Main_Customer_Sbfm.SourceObject = "Main_Customer_Sbfm"
Forms!Form1!Main_Customer_Sbfm.Form!Lot_Number.SetFocus
This nicely switches the form within the subform. the problem is how do I get the form within the subform find the record associated with the data in the LotNumSelect Field?
I tried this..
DoCmd.FindRecord LotNumSelect.Value, acEntire, , acSearchAll
but it's giving me a runtime error of "2162"
"A macro set to one of the current field's properties failed because of an error in a FindRecord action argument.

How to hide the value of a tag in Enterprise Architect documentation

I made a custom template on Enterprise Architect that is a slight modification of the requirements template that came with the program. I edited the template to make it that the value of a specific tag will also be included in the documentation.
"Requirement Type: {Element.valueOf(****)}"**
However, not every element in my document has a value for that specific tag. Is there a way I can have that line show up only when the tag has a value? Or have the documentation say
""Requirement Type: none"
if there is no value?
I am using EA version 8.0.860 from Sparx Systems
If you are using version 10, there is a new feature called Fragment Template. You could move the specific part of the document that you would like to show/hide into a Fragment Template by performing the following steps:
Create a new Fragment Template
Configure the fragment, e.g.
package>
diagram>
element>
Requirement Type: {Element.valueOf(****)}
<element
<diagram
<package
On the Document Options, go to Element Filter tab
Click Add Filter
On the drop-down Search On, choose TagValue
Check the Property, set Condition to "Equal To", and set the value as the Tag name
Check the Value, set Condition to "Equal To", and do not set the value
Check the Required, then press OK button to close Add Filters window. This means that if the Tagged Value has no value, it will not be shown.
Press OK button to close Document Options window
You may create more than one fragment according to your needs.
Import the fragment template into your main template.
But since you are using version 8, IMO the options that you have are:
Adding "Requirement Type:" text into every Tagged Value that has value
OR, adding "none" into every Tagged Value that has no value.
You could create an EA Script to automate number 1 and number 2, because those are repetitive tasks.