Question 1:
When I select the lookup field in Plumsail, the title automatically appears (which is correct). However, I would also like to display the [First name] field from the [PW_Bereichsleitung] list in the lookup.
I have already tried this via the lookup field [Extra fields] by entering “First name” there. However, nothing appeared there in the lookup field. I just can't figure out what I'm doing wrong.
When I select something in the lookup field, 3 text fields in the list [UE60] should be filled with the corresponding data from the list [PW_Bereichsleitung] after the selection. If I change the selection, the updated data should be inserted into the fields.
I have already tried everything possible. But I haven't had much to do with Javascript yet. Maybe you can help me with my problems, as I might need these points more often in the future.
By adding new entries to the Extra fields property you make the Lookup retrieve them, but you need to run a separate JavaScript command to display them. You can include additional fields in the lookup options like this:
To fill in the extra field values into the form fields, try using this approach.
I've already come across these tips, but I can't get any further. Either there is [nothing] in the lookup or only the [Title].
As I mentioned before, my scripting skills are minimal. I have tried to display the [Vorname] field from the list [PW_Bereichsleitung]. Unfortunately still without success. The field is there, as is the list. Here is my current script:
fd.spRendered(function() {
// Lookups erweitern
var lookup = fd.control('Lookup1');
lookup.extraFields = 'Vorname'; // get extra fields //lookup.expandFields = ['Vorname']; // to access complex fields, expand them first
lookup.ready(() => {
function updateFields() {
console.log(lookup.value); // Prüfen des gesamten Lookup-Werts
console.log(lookup.value.Vorname); // Prüfen des Vorname-Werts
fd.field('Vorname').value = lookup.value.Vorname;
}
updateFields(); // update fields when the control is ready
lookup.$on('change', updateFields); // update fields whenever the lookup value is changed
});
As a proposal: Would it be possible to create the script automatically in Plumsail if you type in one ore more "Extra fields"? ... maybe as a comment in the JS-Area?
The script you've provided is for displaying the Vorname in a field called Vorname on the form, not for adding it to the lookup itself. The error in the console is likely caused by the lookup being empty.
so what exactly is the shortest way to add one Field (like "Vorname") to the Lookup.
adding the Name "Vorname" to [Extra field] in the designer AND which Code exactly in the JS Area? Sorry, but as I wrote - I tried different ways to do this, but without success. Either only the title was visible (this is the minimum) or nothing at all.
Or even easier. If you type a field name into the [Extra fields] in the designer you show a list of all available fields from the Lookup-List. The user could choose which one he would like to add. Automatically the Script will be created in the JS Area.
Perhaps this is a crazy idea, but if it could be implemented, it would be really user-friendly ... and EASY for me
We're aware that JavaScript can be too technical for many users, so we're looking into adding special UI elements to configure such custom logic without any code at all. There is no timeline yet, but it's one of our priorities.
Thanks for the idea! I'll relay it to the dev team.
I think that most users have the same concerns and want to solve them as simply as possible. For those who want more, there is the option of realizing the requirements with JavaScript.
How often are there updates to Plumsail Forms for Sharepoint?