Home › Forums › Modern DFFS › vLookup Functionality Questions
- This topic has 1 reply, 2 voices, and was last updated 4 months ago by Alexander Bautz.
-
AuthorPosts
-
-
August 20, 2024 at 23:54 #38017
Two things
1 – when an item is added via vLookup from the parent list to the child list, can it write back values to the originating item? I could create a power automate for this, but just curious.
2 – Is it possible to do nested vLookups and build nested tables? For instance, I have a Project list. From project list I create tasks in a task list via vLookup. From those tasks, I create subtasks in another list via vLookup. Each list I am passing down the Project parent _DFFSID and also standard SharePoint lookup column as well. I want to be able to configure the vLookup table in the Project parent list to show all tasks specific to the project, and then I want to be able to show all the subtasks that are specific to each task. How would be best to accomplish this? I’m not opposed to creating this in the CustomJS section if I need to if the information is available in an object.
-
August 24, 2024 at 09:06 #38024
1. To do this you can use the function dffs_vLookup_callback (see this post for instructions). If the field you want to read back to the parent item is not in your vLookup table you can include it in the “Include additional fields for use in customizer functions” dropdown at the bottom of the Build the table tab.
This function will show you all the child items as an array and you can loop through them to get the value you want.
Alternatively you can add a PreSaveAction like this in your child form:
dffs_PreSaveAction = function(){ child_status = getFieldValue("Status"); return true; }
This variable (because it is not defined with var, let or const) will be available in Custom JS in the parent item. You can use the dffs_vLookup_callback function to pick up the variable and write it to a field in the current item.
2. There is no built in support for nested vLookups so that must be done using custom js.
Alexander
-
-
AuthorPosts
- You must be logged in to reply to this topic.