Ivan Wilson

Forum Replies Created

Viewing 14 posts - 16 through 29 (of 29 total)
  • Author
    Posts
  • in reply to: SPJS-CASC Filter Options #20450
    Ivan Wilson
    Participant

    Unfortunately I need to filter based on the properties of the current user, so I can’t implement as a calculated column.

    I’m trying to use a Jquery statement to remove the option from the DOM, but I’m having problems figuring out where to place this. I’ve tried calling it from a rule that runs when the form is ready or initialized, but in both cases, it seems like the DOM hasn’t been populated with the cascading dropdown values yet. Any suggestions?

    in reply to: Invoke a rule from code #20033
    Ivan Wilson
    Participant

    Thanks Alexander, I thought I had seen that option somewhere, but couldn’t remember where. Would it be worthwhile adding this to the user manual?

    Is there a way to check the last execute status of a rule in code?

    Ivan

    in reply to: Migrating to SP 2016 #19952
    Ivan Wilson
    Participant

    I’ve only used DFFS in SharePoint Online, but one potential issue is if your SharePoint 2013 environment is using classic instead of claims and you have code that reads the username from user fields, you’ll now have to handle the claims portion.

    Chances are your SharePoint 2013 environment is already using claims.

    in reply to: SPJS-CASC Filter Options #19914
    Ivan Wilson
    Participant

    Can you use multiple filter criteria when you call spjs.casc.init? I tried using the following syntax for the filter option, but the operation failed:

    “filter”:[{“filterField”:”Title”,”filterValue”:”testing”,”operator”:”ne”},{“filterField”:”Country”,”filterValue”:”New Zealand”,”operator”:”eq”}]

    Or is there another option for updating the results of this call?

    in reply to: SPJS-CASC Filter Options #19881
    Ivan Wilson
    Participant

    Is there any trick to apply more than one filter for a cascading dropdown, even if it needs to be done when the results have been returned?

    in reply to: Rules not always firing #19751
    Ivan Wilson
    Participant

    I’ve tried both approaches. I found that setting the field using the Set Field Value section in a rule did not trigger the “On Change” rule I set up.

    Setting it using JavaScript seems to work most times, but not every time. Here is the code I’m using. This is called from a rule that files when the form is ready.

    setFieldValue("Manager", _spPageContextInfo.userLoginName);
    in reply to: Query Subfolder #19195
    Ivan Wilson
    Participant

    I’ve been able to use this CAML query to display a specific subfolder in a library in SharePoint Online.

    Ideally I would like to show the contents of this folder expanded by default. How would I automate an onClick event? This would also solve the problem with the rendering of the initial view of the vLookup – the folder name is wrapping onto a second line until you expand it (screenshot attached).

    in reply to: General DFFS enhancement suggestions #18880
    Ivan Wilson
    Participant

    Would it be possible to add functionality to support branching of DFFS? There are deployments where it is not practical to have dev/test/prod environments. We have to develop new functionality in production.

    It would be great if we could “branch” the dffs configuration, make changes, test it, then publish it as the production version. We could use a query string or cookie to indicate whether to use the prod or dev branch when accessing forms or configuring.

    The “enhanced with DFFS” tag could be updated to show which branch you are using and allow you to select a different branch.

    To get extra fancy, this branching may be done at a view, list, web or site collection level. You could also include special branch tags with include files if you want to make them branch specific.

    Obviously, any list configuration changes would affect all branches.

    • This reply was modified 6 years, 4 months ago by Ivan Wilson.
    in reply to: Using setFieldValue with cascading dropdowns #18835
    Ivan Wilson
    Participant

    It looks like it is a timing issue. If I call setFieldValue for each of the fields configured for cascading dropdowns, only the first call works. However, if I put a timeout of 100 ms between each call, then they work as expected.

    My old code:

    
    
    setFieldValue('WorkCountry',countryName);
     setFieldValue('State0',stateName);
     setFieldValue('WorkLocation',locationName);

    New code:

    
    
    setFieldValue("WorkCountry", countryName);
        setTimeout(function () {
            setFieldValue("State0", stateName);
            setTimeout(function () {
                setFieldValue("WorkLocation", locationName);
            }, 100);
        }, 100);

    I’m guessing that the setFieldValue is getting invoked prior to the cascading dropdown logic. Is there a better way of updating the fields instead of using a timeout?

    in reply to: Resolve account name in read-only user field #18732
    Ivan Wilson
    Participant

    Just confirming that this looks like it has been fixed

    in reply to: How to use external js file for common functions #18730
    Ivan Wilson
    Participant

    I’m using the textarea at the top of the custom js page to reference my file. However, I have to declare the functions in the external JS file using:

    window.myFunctionName = function(myParams) {}

    This adds them to the global scope. Is this the approach you’d recommend? It’s working fine, so just wondering if there is a better way.

    in reply to: iframe disappears #18314
    Ivan Wilson
    Participant

    It displays fine on load if it is the first tab, but moving to another tab and back again results in the contents getting cleared.

    I can reload by calling my function from the tab’s onclick event, but this results in a delay while the content is reloaded. The displayform tab doesn’t have this problem – I can switch between tabs and the contents remains.

    Ivan

    in reply to: iframe disappears #18233
    Ivan Wilson
    Participant

    I’m displaying a web page from a separate external website. I pass the details in the list item as part of a POST request and this loads a page of related information in the iFrame.

    It works great on the display form, but something strange seems to be happening on the edit form.

    in reply to: iframe disappears #18206
    Ivan Wilson
    Participant

    My attempts at debugging this haven’t gotten me a lot further. Somewhere between clicking on the tab and the tab loading, the iFrame is getting lost.

    I added a function to call in the tab’s click event. Using the browser debugger I can tell that by the time that function is called, the iframe contents is lost. The call stack doesn’t reveal much and there are no warnings or errors in the console.

    The odd thing is that this works fine in the display form, just not in the edit form.

    I’ve tried loading different pages in the iframe, but that doesn’t affect it. I’ve attached a before and after image of the DOM to show what’s happening.

Viewing 14 posts - 16 through 29 (of 29 total)