drivardxrm / lookupdropdown.pcf Goto Github PK
View Code? Open in Web Editor NEWPCF Control that renders a lookup field as a dropdown
License: MIT License
PCF Control that renders a lookup field as a dropdown
License: MIT License
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.
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 !!
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:
The component is attached in the properties pane:
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:
Thank you very much!!
It would be nice if typing a character while the dropdown has focus, the first option that starts with that character would be selected. This is how the standard dropdowns work.
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 :
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.
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
The CustomText should support complex types (Choices, Currency, Dates, Lookup)
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).
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).
Maybe I miss something. Could you help me on that matter?
Thank you very much for your work and helping the community :)
Would be nice if the open record button could be configured so the user have the choice to open the record
-Normal form
-Sidebar
-Modal
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!
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.
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"
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!
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:
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.
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:
step 2: selected something:
step 3: showing the items again after selecting something
step 4: selecting "--Select--"
... 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...
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);
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
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.