Giter Club home page Giter Club logo

lookupdropdown.pcf's Introduction

Hi ๐Ÿ‘‹, I'm David

Power Platform Architect/Developer, DevOps fanatic, PCF aficionado


MVP_Badge_Horizontal_Preferred_Blue3005_RGB

drivardxrm

david_rivard

Connect with me:

david_rivard davidrivard

drivardxrm

ย drivardxrm

drivardxrm

lookupdropdown.pcf's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lookupdropdown.pcf's Issues

Limitation : Related records filtering not honoured

Currently, the records from the default view defined in the field properties of the form are displayed in the dropdown.

It would be nice to add the 'Related Records Filtering' as well.
image

At the time of the first release, I wasn't able to figure out how to do so.

Record filtering not working !!

Discussed in #4

Originally posted by chintannapster February 15, 2022
I downloaded the latest version 1.0.0.3 and try to apply it on two lookup fields having a relationship for filtering the record. but record filtering is not working. Can you please make it work or help me to to solve the issue ?
Thanks in advance !!

Add support for offline mode

Based on a comment on my blog


Hi David,

Thanks for your response! Seriously you have created an amazing tool here!

I would agree that fetching the data at runtime seems to be the issue. When I am using the control offline, it displays, but no records show up in the control (i.e. just displays โ€œโ€“Selectโ€“โ€œ). I think all that would need to be done to make the control work offline would be:

  1. Call Xrm.Utility.getGlobalContext().client.getClientState() to return whether the device is offline
  2. Iโ€™m not sure how you are fetching the data at runtime (fetch query, odata, etc), but you could then pipe the fetch function through the Xrm.WebApi.offline if the client state was offline

The person using it would need to have all the records in the table in the offline profile, but this makes sense to me since we generally use this PCF for metadata records. In other works, there should only be a handful of such records in a given table, so downloading all of them wouldnโ€™t be such a big deal.

Error fetching data...

Hi,
We have three lookup fields,
The business unit, country and location.

Available countries depend on the business unit selected, and location depends on the country selected.
for the location field, the dependent lookup works perfectly.

For the country field, however, it attempts to load, and then proceeds to display "error fetching data"
image

Issue here is that the business unit has M:M relationship.
In default settings, filtering is accomplished with if business unit contains country,
Is this something I can also do with this PCF?

Thank you!

No data is shown in the dropdown

Hi!
The PCF looks really great but when I configured it, I do not get any values possible to choose from. It does not matter if I provide a custom field to be shown or not. No records are shown in the dropdown.

Update values on view change

Hi David,

Is it possible to trigger an update for the values of the dropdown, when the view is changed programmatically after the control has loaded?

formContext.getControl("").setDefaultView(defaultView);

addCustomFilter not honored

Hi David,

I have a requirement to filter the list of values displayed to the user according to another column value (not a lookup). So I need to use the combo addPreSearch/addCustomFilter in JavaScript.

But the filter is not honored. I honetly do not know if this is actually possible to handle it. Maybe when the user click on the dropdown to display values? if this custom filter is exposed in the PCF context, of course

control behaves strangely in quick create form

I have added the control on a quick create form, with [custom text] set to "{new_myfield}". At first the dropdown renders fine with all the items; however after selecting a value from the list, the text shown is "--thenameofthisrecord--" ( format = "--" & {new_name} & "--" ). Also the dropdown now shows only "--Select--" as options. When selecting this "--Select--" option, the other (correctly formated) values appear again...

step 1, before selecting anything:
image
step 2: selected something:
image
step 3: showing the items again after selecting something
image
step 4: selecting "--Select--"
image
... back to step 1

In the end, the selected data is submitted correctly... so it is only a matter of the visualisation thas goes wrong...

Improvement: Add option to enable searchable dropdowns

Is it already possible in the current application, or if not, as a suggestion that we have had from some of the business users - to enable searchable experience with the control (just like the OOB lookups work), which would simplify the experience for the end users.

Or would this not be viable from the technical implementation? :)
Thank you!

PCF stays at "Loading" stage

Hi @drivardxrm,
Love this PCF thank you!
I've been trying to make it work lately but in runtime, the pcf stays at the "loading" state :
image

Tried it in version 9 and 8, I have the issue in both.
I'm pretty sure I have already made it work in v8 so it seems to be a new issue.

Deactivate/Activate status for values

Good afternoon David,

Thank you for this amazing PCF.
I have installed the PCF and I encounter a functional problem on the Activate/Deactivate part.

I made an example, I would like to deactivate the country Switzerland (could not be selected for user but still remains as a data in my application).
If I change the filter on the lookup and set the Status to all (the dropdown will show all the data in the countries and my data will remain on the form).
Lookup all status

But if I change the view to only select the Active countries, the field be emptied and no data will be show.
If I reactive the country, the field still remains empty (auto save on on the environment).
Lookup active status only - field empty
Lookup active status only

Maybe I miss something. Could you help me on that matter?

Thank you very much for your work and helping the community :)

starting issue

on trying to run this source code , there are an error in the console , you can see it in the attached screen
Screenshot (115)

@drivardxrm

Add support for the Modern Experience.

Hello.

First of all, thank you for the effort you put into this great control. It takes the model-driven UX to the next level!

I would like to request a new feature to make the control supported in the modern UI App Studio as well.
Now, it looks like the control is not visible. So, the control seems to be there. When it's selected, it looks like this:
image
The component is attached in the properties pane:
image

Even the filtering is configured, but this is not working as well.

To make the control work I need to switch the classic mode.

To be specific:

  • Make the control visible in the modern app studio
  • Make filtering work from the modern app studio

Thank you very much!!

Fire onChange handler?

Discussed in #8

Originally posted by joenewstrom April 8, 2022
David, is there a good reason that the control should not fire the onChange Handler for the control? I have a workaround currently by adding a second hidden control for the same attribute, but if onChange were fired (or maybe a boolean that would allow you to turn it on and off?) that would be a nice feature.

Filtering using "current record"

Hi David,
In OOTB lookup control configuration, we can filter the related table based on the "Current Record", very useful to filter a custom N:N.
image

Is there a way to achieve the same behavior in your PCF ?

Cheers

Default value parameter

Add a default value parameter (put GUID of the desired record)

On first load, and if the Form is in Create mode
set the value of the dropdown to the default value

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.