Paul Lynch

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 100 total)
  • Author
    Posts
  • in reply to: Multiple filters from same datasource (CAML) #32020
    Paul Lynch
    Participant

    Thanks Alexander, will work through this and let you know the outcome

    in reply to: Multiple filters from same datasource (CAML) #31988
    Paul Lynch
    Participant

    Hi Alexander,

    I have figured out the CAML queries with help from an excellent and free client side CAML query builder/checker QuickCAML, which works with SharePoint Online (even with SPO multi factor activated which stops many local clients working).

    The only question I have now is that at present I am using different cascading drop down fields (in parent form) to collect/store choices for different tabs (as each cascading drop down has different filtered choices some REST some are now CAML) – these are shown via rules.

    Ideally I would store the data in the same fields for all tabs, but I am not sure how to differentiate between which cascades run and which do not.

    Do not think this is possible in the cascading drop down tab in the DFFS config (backend).

    Guess I would have to invoke the function manually, when a rule shows a tab, it runs a specific cascading drop down and filter for that field.

    I’ve been trying to get the datasource and invoke function to work,

    var res = spjs.utility.queryItems({"SCENARIOS":"CascInitialFilterSource", "query":"<Where> <Or><Contains><FieldRef Name="Column3" /><Value Type="Text">Option1</Value></Contains><Contains> <FieldRef Name="Column3" /><Value Type="Text">Option3</Value></Contains></Or></Where>"

    It is this line which I am confused about, as I am not sure which entries to change in second part of the datasource..

    viewFields":["Title", "FieldValue", "LookupValue"]});

    Here is an example of my working CAML query, with a simple OR filter on one column, the list is called SCENARIOS.. not sure if this helps

    
    
    <View>
        <Query>
            <Where>
                <Or>
                <Contains> 
                    <FieldRef Name="Column3" />
    <Value Type="Text">Option1</Value>
                </Contains>
                   <Contains> 
                    <FieldRef Name="Column3" />
    <Value Type="Text">Option3</Value>
                </Contains>
                </Or>
            </Where>
        </Query>
        <ViewFields>
            <FieldRef Name="Column3"/>
        </ViewFields>
    </View>
    • This reply was modified 2 years, 2 months ago by Paul Lynch.
    • This reply was modified 2 years, 2 months ago by Paul Lynch.
    Paul Lynch
    Participant

    We create child items in the parent form using a standard vlookup “add new item button”.
    The child form “pops up” in a window.
    The child “newforms” are pretty basic forms with 4-5 fields, including at least one hidden people picker field which needs to be pre-populated.
    The child forms have no custom javascript (but do have some custom css).
    The child forms have no “save and redirect” settings in the Misc tab set.
    The child forms have a handful of basic rules (which run but do not actually do anything or apply when the child form is initially created)

    I do wonder if something sometimes “times out” especially if when the issue occurs, the user has an older machine, where running the server side scripts on their browser take longer.

    It has happened to me on both forms, and during testing. (say 5-10% of the time) the fields or at least the people picker field, does not populate.

    Paul Lynch
    Participant

    This is from EditForm

    Here is an example of one attached

    Thanks
    Paul

    Attachments:
    in reply to: Using opening links using document library feature #31192
    Paul Lynch
    Participant

    Thanks for this Alexander, and good news about MS backing down.

    My vLookup (configured within FORM1) uses a document library of excel files (FORM2)

    Is it possible to;
    – When user clicks to edit the vlookup item in table (FORM1)
    – Get a pop up and see the Editform (FORM2) of the doc library item
    – Within FORM2 pop up, have a html field, or script the Name field, so it becomes a link that opens excel in a new tab?

    The “Name” field doe not do this, unless it is in display form (although it downloads it rather than opens in a tab).

    in reply to: Copy and paste not working on read only fields #31077
    Paul Lynch
    Participant

    Thanks Alexander this works great

    • This reply was modified 2 years, 5 months ago by Paul Lynch.
    in reply to: Copy and paste not working on read only fields #31065
    Paul Lynch
    Participant

    Using Chrome (and it is editform) display form is ok.
    Version 84.0.4147.105 (Official Build) (64-bit)

    Did just try Firefox and IE11 and exactly same outcome.

    This is on any form. Removed all css and turned off the border and shading in the MISC tab. So forms are pretty basic.

    Single line of text and choice fields are also ok, just multi line of text fields (these are enhanced rich text).

    Actually I just changed the fields from enhanced rich text to plain text and it fixes it too. So it is only with “Enhanced Rich Text”.

    in reply to: Copy and paste not working on read only fields #31058
    Paul Lynch
    Participant

    I know there is the user-select css property.

    user-select value

    none – user cannot select the text
    text – user can select the text
    all – user can select the text with one click
    auto – user-select value depend upon its parent user-select option
    contain – selection will be bound to particular element
    element – IE version of user-select contain.

    I can stop it being highlighted using “none”, but setting it to “text” even using !important, will not force it to allow me to keep it highlighted.

    in reply to: New Item not working on Sharepoint New Experience #30972
    Paul Lynch
    Participant

    Also just to the original posters comment, one client runs O365 SharePoint Online and recently defaulted all SP lists on classic and modern sites to the modern lists.

    This does not let DFFS work until I switch the lists from modern or default to “Classic mode” in the List Settings – Advanced Settings.

    in reply to: New Item not working on Sharepoint New Experience #30970
    Paul Lynch
    Participant

    Hi Alexander, actually was wondering today whether the DFFS solution could work with the modern experience in SharePoint. As I can make a modern experience site, and modern list run in “classic mode”

    The main issue is the modern platform does not allow CEWP or SCRIPT web parts out the box. So cannot add a CEWP to run the DFFS installer.

    Been considering using PnP/Powershell to try to add a CEWP to the site to get the installer going.

    Just wonder if you think this is worth a try or is this ultimately always going fail or not run properly at some point on modern for other technical reasons?

    in reply to: Using opening links using document library feature #30897
    Paul Lynch
    Participant

    Sorry Alexander, I have a separate vLookup, with pdf’s only. Obviously not O365 MS application.

    Is there anyway to force these to download (rather than open in browser), or even better open in Adobe (or prompt a choice)?

    in reply to: mandatory vlookup field #30867
    Paul Lynch
    Participant

    Thank you, now this works, there is another slight problem

    The functions that check the vlookup has a child item, sometimes return false even though there is an item in the two vlookup tabs.

    I think this is because as the form opens it goes straight to the tab with the button, so the tabs with vlookups are never opened and the vlookup query does not run or has not finished running before button is pressed.

    If I open the tab and let it populate the table for each vlookup, the above functions all perform correctly and all come back true.

    Not sure what best strategy is to get over this? Maybe some kind of delay mechanism, but do vlookups ever process in tabs that are never opened?

    in reply to: mandatory vlookup field #30854
    Paul Lynch
    Participant

    Thanks! This is pretty much exactly what I needed except I could not get Jeff’s code to work, it only seem to check the first vlookup and return a message (not the next).

    Our requirement is to actually run three functions in parallel;

    function1 – checks vlookup1 has at least one child (if not it sends message and all functions stop)
    function2 – checks vlookup2 has at least one child (if not it sends message and all functions stop)
    function3 – sets certain fields in form to mandatory

    The above functions are triggered when a button is pressed, all functions run and if ALL come back as true, it updates “status” field in form and sends an email.

    Can make all these functions run independently fine, but I am not sure how to combine the functions together with if/else statements.

    function 1 (and function 2 is pretty much same)

    
    
    function function1() {
        var hasChildren = false;
        if(spjs.vLookup.dataObj["vLookup_Children"] !== undefined && spjs.vLookup.dataObj["vLookup_Children"][spjs.dffs.data.thisItemID] !== undefined && spjs.vLookup.dataObj["vLookup_Children"][spjs.dffs.data.thisItemID].count > 0){
            hasChildren = true;
        }
        if(!hasChildren){
            alert("You must add a child item before you can save this item");
            return false;
        }
        return true;   
    }

    function3

    
    
    function function3() {
        setFieldValue("Req_Review", [spjs.dffs.buildValStr("{timestamp[MM/dd/yyyy]}"),spjs.dffs.buildValStr("{timestamp[HH]}"),spjs.dffs.buildValStr("{timestamp[mm]}")]);
        setFieldValue("status","2. Sent for review");
        spjs.dffs.flag_Mandatory(["IssueDescription","Something_Else"]);
        var allReqFieldsFilled = spjs.dffs.check_Mandatory();
        if (!allReqFieldsFilled) {
            spjs.dffs.alert({
                "title": "Missing required fields",
                "msg": "You must fill in all required fields",
                "ok": function(){
                    // Close dlg
                }
            });
            // Exit function3 fn
            return false;
        }
        spjs.dffs.processEmailTemplate('RequestforReview')
    }
    • This reply was modified 2 years, 6 months ago by Paul Lynch.
    • This reply was modified 2 years, 6 months ago by Paul Lynch.
    • This reply was modified 2 years, 6 months ago by Paul Lynch.
    in reply to: vLookup – Update Child when Parent is Updated #30852
    Paul Lynch
    Participant

    Thanks Alexander, this works.

    It only works for the first item added to vlookup, but as vlookups are a “one to many” relationship, not sure where I was going with this, unless i could filter out certain child items, with certain statuses as form loads (in vlookup query) so that only one relevant result appears.

    in reply to: vLookup – Update Child when Parent is Updated #30841
    Paul Lynch
    Participant

    Been looking at options and wondering if “special configuration” option in the vlookup table could call the function to perform this..

    {"function":"functionName"}

    So if I take my current item (status) field in vlookup, set the special configuration to be:

    {"function":"updatestatusfunction"}

    Then the in my parent custom JS area I use

    
    
    function updatestatusfunction() {
        setFieldValue("STATUS","xxxxstatusfromvlookupxxxxxx");
    }

    How can I populate (SP.listItem will be passed as an argument to the function) xxxxstatusfromvlookupxxxxxx by passing current field value (vlookup child)?

    STATUS is the internal field name of both parent and child (with identical values in a single choice column)

    • This reply was modified 2 years, 6 months ago by Paul Lynch.
    • This reply was modified 2 years, 6 months ago by Paul Lynch.
Viewing 15 posts - 16 through 30 (of 100 total)