PowerApps for MS Teams - Duplicate record added to combobox when setting DefaultSelectedItems - microsoft-teams

I am developing a Power App using the Teams version. We have two tables in Dataverse acting as the main data sources. There is an inheritance relationship between these two tables, where one holds parent objects and the other child. I have an overview screen which displays a single record and it is important that a user can select both parent and child records from a single combobox and have the data associated to the selected record displayed.
In order to achieve this I have a collection which holds the ID and Parent/Child type of each record to form a full list of records from both tables. Collection is built as follows:
ClearCollect(Collection_RecordSelect,AddColumns(ShowColumns(record_parents,"recordID","recordID_numeric"),"type","parent")); Collect(Collection_RecordSelect, AddColumns(ShowColumns(record_children,"recordID","recordID_numeric"),"type","child"));
When a user selects a record from the combobox, the ID value from the collection is looked up against the respective data source to get the rest of the data for the record.
The issue I have now is, when a user makes a change to a record in another screen, the app returns to this overview screen to show the record they have just changed. To achieve this I used the DefaultSelectedItems property of the combobox which looks at a selectedRecord variable containing the record ID as a string, set after a user changes the record in another screen. As the combobox requires a record, the combobox uses the selectedRecord variable to Lookup into the collection I referenced earlier to get the full record, unless it's blank in which case it default to the first record. Shown below:
If(IsBlank(selectedRecordID),First(Collection_RecordSelect),Lookup(Collection_RecordSelect, recordID = selectedRecordID))
This results in the combobox displaying two instances of the selected record and showing the old version of the record before the user made changes on the overview screen. If you select another record, the duplicate disappears. If you select the other duplicate record in the combobox, the user's changes are then shown on the overview screen.
Screenshot of duplicate record in combobox.
I have tried creating a single collection, containing all records from both tables, however as they are slightly different due to the inheritance field in the child table they don't merge properly and data is missed. Unfortunately, I need the inheritance field on the overview screen so I can't use ShowColumns and remove it.
I have recently re-built the app in Teams as opposed to standard Power Apps. This solution worked fine in the standard Power Apps environment, so I have a suspicion it may be a bug with the Power Apps for Teams combobox? Unless I am making a mistake, I think this is probably true as I've just tested and the "Classic Control" combobox doesn't have the same behavior, shame because it looks rubbish compared to the Teams one!
I have turned off multi-select on the combobox and search and the problem still exists.
Any help would be hugely appreciated!

Related

Oracle Apex create a form that is split into multiple regions

I have a merchant application form that I want to split up into multiple regions so that the user only has to see one section of the application at a time. Each region is tied to the same table therefore:
Each region would have to share the same primary key
I only want one submission of the form items at the end of the form
I read this post Create an Apex form with multiple pages
which makes it seem like an easy to do process by using the Hide and Show Region template and manually separate the form into multiple regions. The problem I'm running into is that Apex requires a primary key to be tied to each form region, but you also can not have duplicate items on the same page. Any ideas?
-- attaching the PNG of the error message here Primary Key ERR
To me, it looks like a single page with several regions. Doing so, you'd have only one primary key item.
Logically, you'd separate items into different regions. Each of them should use its "Server side condition" which would decide whether to render (i.e. display) that region at certain time or not. It means that it doesn't have to be a hide and show region (besides, it is always here and visible, user just decides whether to reveal its contents or not). You'd create any region type (even an ordinary HTML region).
For example:
the first region displays customer ID, name and address. Other regions are "hidden" because e.g. P1_ID IS NULL is met as no data has been submitted yet. Once user enters ID, name and address and submits the page, P1_ID gets its value which enables other region(s) to be displayed
the second region contains items about some other customer's data; it is now visible because P1_ID is no longer NULL, but 3rd region is still hidden as you didn't enter some required data in the 2nd region which would let the 3rd region to be displayed.
and so forth
Note that the post you are referring to is 6 years old. That is like medieval in apex terms - so much has changed since then.
This is a way to do it if you want multiple pages. Just create multiple pages with the same form (using the create form functionality) and depending on the functionality needed on a specific page you delete the page items you don't want to show. If a database column is not included in the form it will not be touched by the dml process. This should be relatively simple to create.
Note: if you want to get up to speed on forms, read this blog

Access subform object hangs when selecting column?

I have an Access app I wrote, to handle the data work a team needs to do, rather than working on a giant excel spreadsheet. The one annoying constraint is people are sharing this db over a wifi connection.
I have the db split, so users get a copy of the front end in runtime, when they run a bat file shortcut. The backend is on a hard drive, connected to a laptop, which is directly connected to the wifi router.
In this app, I have a form with a combo and some buttons to perform functions on dynamic queries, so the user can filter the records. Everything is in 1 table, and the table has about 75,000 records. When the users go to the form, on load, a sql string is constructed, to set the base recordsource for the form.
When a user clicks any column in the datasheet view subform object, the whole form freezes and you can see in the bottom right Access says "running query". The users like to click the drop down arrow by the column to filter based on values, and that usually isn't too bad, but clicking on the column seems to trigger a query to run and I don't know why. Can anyone help?
I just want to up the performance on this application as much as possible. These forms allow the users to filter to a set, select the rows they want, click a button, and a column gets tagged (assigning those records to someone). Then a button shows, they click it, and those results are exported to an excel formatted template. They send that to the person assigned the records. Later that comes back to us, and I have a button for our users to import that sheet and process what the assigned person entered on their records.
Thanks for any help anyone can give!

Oracle ADF : Select Check box at row level giving issue while selecting in panel tabbed

I am referring to this blog.
http://andrejusb.blogspot.in/2010/05/yes-no-check-box-in-query-criteria.html
however my requirement is different. I have multiple tabs where multiple tables are present. In each table row I need a column attribute is_active in checkbox format. So basically I want to store active or non active setup lines through panel tabbed screens.
With above blog approach first tab is working fine for checkboxes, but the second , third and other tabs are having below issues in check box.
When selected one checkbox, let's say it is checked, other checkboxes in all rows gets checked.
I checked the binding it is bind to it's respective attributes and VO iterators in pagedefinition, I chceked the code for model and view layer for working and non working tab.
Above issue is solved when created a transient attribute with control type checkbox, that transient attribute will be contolling the is_active value.

Can I add a custom/email domain column in Outlook?

Sometimes in Outlook I want to be able to see the last few emails I received or sent to a client.
As there can be several individual email addresses per client, the only way to reliably identify emails as belonging to a client is to look at the domain part of the email address, eg the company in person#company.com
How can I add this as a sortable column in the main views (Inbox, Sent Items, etc)?
Almost found what I want from here (I've improved on the formula).
Add a new column to a view from the Show Columns dialog, click New Column and enter a new formula based column:
IIf(InStr([SearchFromEmail], "#") = 0, "", Mid([SearchFromEmail], InStr([SearchFromEmail], "#") + 1))
Similar question was asked here https://superuser.com/questions/703013/outlook-how-to-display-sender-email-address-in-inbox/703035#703035
Be aware, the ItemAdd event of the Items class is not fired when multiple items are added to the folder at the same time.
You can handle the NewMailEx event of the Application class which is fires when a new message arrives in the Inbox and before client rule processing occurs. You can use the Entry ID returned in the EntryIDCollection array to call the NameSpace.GetItemFromID method and process the item.
In the event handler you can add a user property which can be user in the UI for sorting items (MailItem.UserProperties.Add). The CurrentView property of the Folder class returns a View object representing the current view.
The View object allows you to create customizable views that allow you to better sort, group and ultimately view data of all different types. There are a variety of different view types that provide the flexibility needed to create and maintain your important data.
- The table view type (olTableView) allows you to view data in a simple field-based table.
- The Calendar view type (olCalendarView) allows you to view data in a calendar format.
- The card view type (olCardView) allows you to view data in a series of cards. Each card displays the information contained by the item and can be sorted.
- The icon view type (olIconView) allows you to view data as icons, similar to a Windows folder or explorer.
- The timeline view type (olTimelineView) allows you to view data as it is received in a customizable linear time line.
Views are defined and customized using the View object's XML property. The XML property allows you to create and set a customized XML schema that defines the various features of a view.
Not out of the box. You can process all your existing emails (and automatically process all new items using MAPIFolder.Items.ItemAdd event on the folders that you want to process) to set a user property (MailItem.UserProperties.Add) to the value extracted by your code. If you modify the folder views to include your property, you will be able to see it.

front-end user interface to view record edit history

I have a web application that inserts/updates/deletes records from a database. Each time a transaction is made to a table, the change is recorded with the type of modification and the previous values from a trigger. What is a good web user interface layout to view such transactions to the users? Currently we just dump the whole history table to the user in a html table row and column format. I'm looking for some interface hints to present these edit history better.
Thanks for your input.
You can use a grid representation of the database table, plain html or produced by a js framework, plenty of options out there.
For the newly inserted records with no updates, just show the record with the insertion datetime.
For records that have been updated you can add a link/button at the end of the row with a title like "history" or "previous versions" or somethink like that and when a user clicks on it, then you can open a subgrid under this record or a pop up with a new grid (depends how you will implement your grid on the first place) which will show this record's history only.
The deleted records, you can add them (at the bottom of the table maybe) but grayed out or striked out. Again you can add the history option if you want it even for deleted records.
EDIT:
You could also add some filtering functionality above your grid for the user to select/see only the inserted/updated/deleted records and of course sorting functionality on the grid columns

Resources