Dear,
In a model-driven app, how can I have 2 (identical) forms of 2 (different) records of the same table side by side?
Ideally, I would also like to highlight differences between the two records in the forms...
Any idea?
Thanks,
Koen
@HemantG no PCF involved and I coded it - check my previous reply.
@a33ik Awesome! It's so wonderful a community is that helpful AND Power Platform is highly customizable!
@HemantG I have been thinking about putting the "internal" and "external" records in different tables, but that means I have to make forms, field definitions,... twice and keep them synchronized...
The filtering is currently not really a problem; I was also thinking of deactivating all the external records, so they don't appear in default views...
Interesting discussion. Keeping both the internal and external records in the same table means filter for showing one needs to be added at all places like views, lookup etc etc. Why not use another table which is copy to make it master for external and use the workflow/Plugin to copy the data when master external data record is created.
For compare and merge you can write a control which when clicked uses WebAPI to fetch the right record data from external table using the record key from the current form of internal entity and shows the readonly tabular values side by side for the values which differ. Something like
User can pick and choose the right fields which the control uses to update the internal record when the save is clicked. Control default UI can be just one button saying merge external and when clicked , it goes full screen and uses pre-fetched values to render the UI.
@a33ik entity name for master and key field name can be configurations for theis PCF if you are planning to code 🙂
hemant
@KoenJanssensPD I will work on the video today and may publish it tomorrow but as a spoiler you can see this:
Wow, that's awesome.
I checked the code a bit and it even contains a Diff-view, nice! I will wait the video to see the results 🙂
@KoenJanssensPD I wrapped the first version of the extension and it is available here - https://github.com/AndrewButenko/SideBySideComparisonReport
I plan to release the video today/tomorrow so if you don't want to miss the release - subscribe to my Youtube channel.
Another option to consider - totally outside technical solutions - is that there might be some rules-based mechanism for making the "do I overwrite" determination on users' behalf. Often people are just so accustomed to making that sort of call that it doesn't even occur to them that it is systematic and reproducible.
For example, let's say the field is a phone number. In the 'internal' system we have (123) 123-1234 (forgive the US formatting, @KoenJanssensPD - I'm guessing you don't use that!) then from the "external" system we get an update for (234) 234-2345. This new number has a valid format, and therefore there is probably no reason we wouldn't just automatically accept it, whereas if it came back 234-2345 we might reject it because the format is not what we expect and we don't want to lose the quality of what we have.
Of course, this is a very simple case and the real business operation would be much more complex, but in many... maybe the real majority of cases, there are such heuristic rules that could be applied to make any exceptions so infrequent that special tooling is not required.
Hi @KoenJanssensPD ,
Basically I mean using the "internal" record form as a basement, and show there also the form of the "external" record using a control (if the lookup is bound that way). So for the "internal" record you don't need to use a form component, since you are already inside the form itself.
And for the "external" record you could use (via lookup):
- As Quick View Form control: I mean the possibility to show a special form of the linked entity, like this: https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/quick-view-control-properties-legacy?WT.mc_id=BA-MVP-5004107. The advantage of the quick-view-form is that it is read-only by design. I suppose you would like to have the "external" record read-only.
- The other possiblity is the Form Component Control (FCC) like in the link you already found: https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/form-component-control?WT.mc_id=BA-MVP-5004107. In this case, the user will be able to edit the "external" record too. But if you prefer this solution and want it read only, you can still use form scripting on the "external" form and disable all controls.
Hope this helps!
Kind regards,
Diana
WarrenBelz
146,660
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional