andrewbutenko / compositeaddress_pcf Goto Github PK
View Code? Open in Web Editor NEWComposite Address PCF control
License: MIT License
Composite Address PCF control
License: MIT License
Hi Andrew,
I am not able to understand what value is required for Address Pattern, Is it a regex expression or something else ?
We were having issues with view names not displaying correctly, we didn't know what was causing it so we just submitted a ticket with MS.
MS came back with results from their product team as follows:
This issue is caused by Composite Address Control in the field Address 1 in the contact form.
Removing or selecting Text Box(default) resolve the issue
Is Composite Address Control a 3rd party control?I have tested in your organization, and it seems to be resolved the issue.
Here are the repro steps
1- Navigate to Customization > customize the system
2- Expand entities and select Contact
3- Select the contact form
4- Dclick the field Address1
5- Select control
6- Either remove Composite Address Control or select the default text boxSo if you have this Composite Address Control added in any other entity it will behave the same.
We Recommend contact the 3rd party control developers so they can modify the CSS for their AB.ConpositeAddress
The CSS attribute that causing the issue is this below
Anyone else experienced this before?
Hi Andrew,
In learning PCF controls, I chose to rebuild your solution to familiarize myself with PCF underpinnings and tailor the solution to meet 3 needs. The latter 2 are not part of the issue, but are related and included for context.
1. Support a multiline composite address field:
While your github support issue #2 indicates multiline is supported, we couldn't bind it to a multiline composite address field. I noted in the manifest that the value property is limited to singleline.Text, and does not allow for SingleLine.TextArea. So, I added a type-group to allow binding to either. If this was the only change, I'd have gladly just confirmed it works in a live system, packaged it up and sent you a pull request + thank you.
But, in the code, I've also noticed this replacement of newlines with commas:
this.currentValues.value = formattedAddress;
this.mainAddressField.value = formattedAddress.replace(/\n/gm, ', ');
In the harness, I find that newline (/n) characters are showing on the console log, but don't render as a multiline on a field rendered in the control itself. Can you clarify the difference between these two lines and why the mainAddressField.value is being reformatted with commas? How do I get the control to render multiline?
2. Eliminate extraneous newlines & commas if any values were null,
If we include an addressline2, but the value is null, we'd end up with either an extra newline or comma. Rather than using the formatAddress method (which is very cool, BTW), I wrote a less flexible, but more specific method to format for US addresses which only adds line breaks and commas if the relevant values were present. It would be awesome if there were a way to merge it with the flexibility of your format string based approach, but that is a bit beyond me.
3. Add an separate zipcode extension field: Easy enough. Done.
You are a stellar leader in the community. I'm aware of some training videos you've put together and will be carving out some time to review them.
I am trying to buid a solution from the code I have downloaded but I am getting the following error.
C:\Users\sanket\Desktop\pcf\onepcf\onepcf.cdsproj" (build target) (1:7) ->
(ProcessCdsProjectReferencesOutputs target) ->
C:\Users\sanket.nuget\packages\microsoft.powerapps.msbuild.solution\1.0.6\build\Microsoft.PowerApps.MSBuild.Solution
.targets(98,5): error : Project Reference with output path 0, is not a valid PowerApps Component Type [C:\Users\sanket
\Desktop\pcf\onepcf\onepcf.cdsproj]
C:\Users\sanket.nuget\packages\microsoft.powerapps.msbuild.solution\1.0.6\build\Microsoft.PowerApps.MSBuild.Solution
.targets(98,5): error : Cds component type not supported [C:\Users\sanket\Desktop\pcf\onepcf\onepcf.cdsproj]
I am following this tutorial to build the solution:
https://www.youtube.com/watch?v=2uO2L2xTPkc
If there is any other way to install this component to PowerApps please let me know.
Hello,
The adress fields are not showing up in field selector. The selector show some SingleLigne.Text field but not the adress' one.
Hi Andrew,
All works fine, great job!
But still, have a quick question - any possible reason why some single.text fields are not visible in PCF customization? (Ex. native field address1_line1 for street 1 field)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.