cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Binding PCF Field to a Floating Point

Hi,

 

I'm trying to create a PCF control, and I have a field from type Floating Point Number, I set the type of my field as FP, but that field (address1_longitude) is not showing in the options to bind it, any ideas

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
MVP

Re: Binding PCF Field to a Floating Point

15 REPLIES 15
Highlighted
Impactful Individual
Impactful Individual

Re: Binding PCF Field to a Floating Point

From memory address fields are not accessible by PCF components due to the way address fields work in the background .

---
If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".
Highlighted
Skilled Sharer
Skilled Sharer

Re: Binding PCF Field to a Floating Point

Hi @Aboodhamwi95 ,

You could vote the Idea: https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Enable-binding-to-OOB-Address-Fields/idi-p/3023...

There is also a workarround to it. It might work in some cases.

Best regards,

Diana

Highlighted
MVP

Re: Binding PCF Field to a Floating Point

Highlighted
Frequent Visitor

Re: Binding PCF Field to a Floating Point

Hi @a33ik ,

 

Thanks for this solution, I update the form XML as requested, but the attribute is not being bonded in the code, this is my XML

<Latitude type="FP">address1_latitude</Latitude>
<Longitude type="FP">address1_longitude</Longitude>

image.png

you can notice that the attributes object is empty

Highlighted
MVP

Re: Binding PCF Field to a Floating Point

Have you placed attributes on the form if you have not - put attributes to the form and make them hidden.

Highlighted
Frequent Visitor

Re: Binding PCF Field to a Floating Point

I tried that but It didn't work
Highlighted
MVP

Re: Binding PCF Field to a Floating Point

Can you please post your Manifest File and piece of customizations.xml where you configure your control - I mean full control - not only longitude/latitude chunk?

Highlighted
Frequent Visitor

Re: Binding PCF Field to a Floating Point

Hi @a33ik ,

 

This is the control manifest

<?xml version="1.0" encoding="utf-8" ?>
<manifest>
  <control namespace="hamwi" constructor="GoogleMapLocation" version="0.0.13" display-name-key="GoogleMapLocation" description-key="GoogleMapLocation description" control-type="standard">
    <type-group name="numbers">
      <type>Whole.None</type>
      <type>Currency</type>
      <type>FP</type>
      <type>Decimal</type>
    </type-group>
    <property name="Field" display-name-key="Field Name" description-key="The name of field value" of-type="SingleLine.Text" usage="bound" required="true" />
    <property name="Latitude" display-name-key="Latitude Field" description-key="The latitude value" of-type-group="numbers" usage="input" required="true" />
    <property name="Longitude" display-name-key="Longitude Field" description-key="The longitude value" of-type-group="numbers" usage="input" required="true" />
    <property name="GoogleAPIKey" display-name-key="Google Map API Key" description-key="The Key for Google Map API" of-type="SingleLine.Text" usage="input" required="true" />
    <property name="ButtonColor" display-name-key="Button Color" description-key="The color of the button for saving" of-type="SingleLine.Text" usage="input" required="false" />
    <resources>
      <code path="index.ts" order="1" />
      <css path="css/MapHandler.css" order="1" />
    </resources>
    <feature-usage>
      <uses-feature name="Device.getCurrentPosition" required="true" />
    </feature-usage>
  </control>
</manifest>

 

this is the form XML

    <controlDescription forControl="{a33744be-9e66-d04c-9d14-318eb0679c35}">
      <customControl id="{4273EDBD-AC1D-40D3-9FB2-095C621B552D}">
        <parameters>
          <datafieldname>msdyn_externalaccountid</datafieldname>
        </parameters>
      </customControl>
      <customControl name="ha_hamwi.GoogleMapLocation" formFactor="0">
        <parameters>
          <Field>msdyn_externalaccountid</Field>
          <Latitude type="FP">address1_latitude</Latitude>
          <Longitude type="FP">address1_longitude</Longitude>
          <GoogleAPIKey static="true" type="SingleLine.Text">asdasd</GoogleAPIKey>
          <msinternal.isvisibleinmocaonly static="true">true</msinternal.isvisibleinmocaonly>
        </parameters>
      </customControl>
      <customControl name="ha_hamwi.GoogleMapLocation" formFactor="1">
        <parameters>
          <Field>msdyn_externalaccountid</Field>
          <Latitude type="FP">address1_latitude</Latitude>
          <Longitude type="FP">address1_longitude</Longitude>
          <GoogleAPIKey static="true" type="SingleLine.Text">asdasd</GoogleAPIKey>
          <msinternal.isvisibleinmocaonly static="true">true</msinternal.isvisibleinmocaonly>
        </parameters>
      </customControl>
      <customControl name="ha_hamwi.GoogleMapLocation" formFactor="2">
        <parameters>
          <Field>msdyn_externalaccountid</Field>
          <Latitude type="FP">address1_latitude</Latitude>
          <Longitude type="FP">address1_longitude</Longitude>
          <GoogleAPIKey static="true" type="SingleLine.Text">asdasd</GoogleAPIKey>
          <msinternal.isvisibleinmocaonly static="true">true</msinternal.isvisibleinmocaonly>
        </parameters>
      </customControl>
    </controlDescription>
Highlighted
MVP

Re: Binding PCF Field to a Floating Point

Hello,

That looks good for me. What is the type of msdyn_externalaccountid field? Also what's the type of the form you want to use your control on?

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Users online (6,997)