Forum Replies Created
-
AuthorPosts
-
Ignore first diagram. Unable to delete.
Attachments:
The attached diagram indicates the fields and interconnects between two lists (Large child list and a parent list).
The attached text file is the Custom JS from the Parent list. A Parent list Rule calls the script from ‘Run these functions’ with the entry: init_getRelatedItems.
The Reverse lookup from the Parent list to the Child list always returns a blank. No errors and no text.
Thanks for your help.
Mike- This reply was modified 5 years, 3 months ago by MikeS.
I’m having a bit of trouble getting the other script to work (SharePoint lookup column between parent and child).
The reverse lookup from the Parent (small list) to the Child (large list) always returns “There are no related items.” So script is executing but not seeing the related items that were associated using a SharePoint lookup column in the Child list looking up into the Parent list.
Any ideas?
Mike
Success! Just modified the function with the call I make from a rule:
// Function call – change parameters here
function init_getRelatedItemsText (){
getRelatedItemsText({
“placeholderID”: “ReverseLookup”,and now the reverse lookup works. Doing some additional testing with different data combinations and use cases.
A big thank you,
MikeI recopied the raw HTML into the DFFS Custom JS from the page source. I ended up with an error as shown in the attachment. Not obvious to me how to recover from this as need to escape the “>” and it’s throwing that error.
Mike
- This reply was modified 5 years, 3 months ago by MikeS.
Attachments:
Just about there . . .
I modified the initial steps of the function call as follows:function init_getRelatedItemsText (){
getRelatedItemsText({
“placeholderID”:”ReverseLookup”,and it is called by the following rule:
init_getRelatedItemsText
However, the results below (from the Parent list Reverse Lookup tab) indicate the raw data is correct but not picking up the CSS formatting for some reason. Any ideas?
<table class=’dffs_relatedItems_table’><tr class=’dffs_relatedItems_headerRow’><td class=’dffs_relatedItems_headerCell’>Title</td><td class=’dffs_relatedItems_headerCell’>Author</td><td class=’dffs_relatedItems_headerCell’>Created</td></tr><tr class=’dffs_relatedItems_row’><td class=’dffs_relatedItems_cell’>TN-001</td><td class=’dffs_relatedItems_cell’>Mike</td><td class=’dffs_relatedItems_cell’>11/20/2018</td></tr><tr class=’dffs_relatedItems_row’><td class=’dffs_relatedItems_cell’>TN-004</td><td class=’dffs_relatedItems_cell’>Mike</td><td class=’dffs_relatedItems_cell’>11/20/2018</td></tr></table>
Mike
See attached.
I’m calling this from a Rule with:
init_getRelatedItems
Having trouble wrapping the
function init_getRelatedItems (){
// Call getRelatedItems inside
getRelatedItems({
“placeholderID”: “ReverseLookup”,
…
…
});
}snippet around the function.
Attachments:
Same error persists:
DFFS: Configuration error in “Run these functions / trigger these rules”. Ensure you use the correct function name or rule friendly name.
The rule “RunReverseLookupScript” tried to invoke the function:
“init_getRelatedItemsText”Error:
TypeError: window[f] is not a functionI’m getting the following error when clicking the Reverse Lookup tab in the Parent list after incorporating the code for common text cascading dropdown:
DFFS: Configuration error in “Run these functions / trigger these rules”. Ensure you use the correct function name or rule friendly name.
The rule “RunReverseLookupScript” tried to invoke the function:
“init_getRelatedItemsText”Error:
TypeError: window[f] is not a functionNote that there appeared to be a few extra characters at the very end of this line in the code:
“filter”: “<Where><Contains><FieldRef Name=’DFFS_PN_Lookup’ /><Value Type=’Text’>”+getFieldValue(“Title”)+”;</Value></Contains></Where>”;
“,I had to delete the characters
;”
to get rid of the JS error messages.
Mike
- This reply was modified 5 years, 3 months ago by MikeS.
Picking up the conversation here from the blog post so I can add attachments and formatted code.
The script is returning what is shown in the attachment regardless of the parameters entered in the function call.
Setup
Referring back to the diagram: The Ticket list is my Child list and the Part Number list is my Parent list. The Child list lookup field to the Parent (Part Number) list is “DFFS_PN_Lookup” and is configured in the DFFS Cascading dropdowns Edit panel for this list. I then assign the same Part Number to various Tickets via this lookup field.I have configured the Part Number Parent list DFFS Display form with the Custom JS, CSS, and a Tab ID “ReverseLookup.” I have configured a Rule that calls the function (init_getRelatedItems) when the Display form tab is loaded.
When I click the Parent list Reverse Lookup tab I get no matches, even though there should be several.
- This reply was modified 5 years, 4 months ago by MikeS. Reason: added attachment
Attachments:
I have described the DFFS reverse lookup use cases in the attached diagram so the requirements and use cases could be as clear as possible. Let me know if any questions. Thanks for your help.
Mike
Attachments:
Thank you Alexander. It works exactly as needed.
Mike
Alexander,
This is a follow-up to the “pause” splash screen query. I’d like to detect a NON-Firefox browser (Internet Explorer, Edge, Chrome) and show a message that states “Use Firefox for faster loadtimes”.
How could I do a browser detection in your custom JS:
var mustReadOverlayId = spjs.dffs.alert({ "title":"Please read instructions (Closes after 10 seconds)", "msg":"Put the instructions here - you can use HTML code or plain text.", "noBtn":true }); // Remove overlay after 10 seconds setTimeout(function(){ spjs.dffs.closeDlg(mustReadOverlayId ); },10000);
Thanks
Mike- This reply was modified 5 years, 6 months ago by MikeS.
March 28, 2019 at 00:36 in reply to: Concatenate and Write Cascading Dropdown Selections to Text Field #24509I had mis-configured a DFFS Cascading dropdowns entry. Once I removed “multi” from the Level 1 field in “Comma separated list of fields in the current list” your script worked perfectly. Thanks again for your help. Sorry I didn’t realize this sooner.
Mike
I find Firefox to be much faster than IE (forget Edge) when using SharePoint with large lists, 47,000 item drop downs, etc.
Mike
-
AuthorPosts