SteveE

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 56 total)
  • Author
    Posts
  • in reply to: Starter Guide #35583
    SteveE
    Participant

    Hey Rick – there isn’t a guide, but I’ve successfully used dffs on SharePoint Online for the past year and half. Start with installing the Modern CEWP in the top links. You may have to enable custom scripting in the admin center. I think he has that information on here also, but if you search online you’ll find it (I didn’t use powershell). Then I just set up the installer like you normally do. You may have to turn on web part pages in settings if you don’t see it. You can use the modern experience on the lists if you want, but most of the time I use classic so I can customize the view to my liking.

    I know Alexander is working on something more specific for modern SharePoint, but I’ve been able to use it mostly as it worked before.

    in reply to: vLookup Disp/Edit Form Issue #35564
    SteveE
    Participant

    What did you change about the query? If you change it back does it show up correctly in both forms?

    in reply to: Varying checkbox formats #35549
    SteveE
    Participant

    You can’t change the border as it’s a character (like a bullet). You could try to replace it with a different white box character that might have a different size box or border, but I’m not sure how he’s doing that in the code. Best bet is to get the boxes to line up in size for now. I thought 1.6 em seemed to line up better, but you’d just have to play with it.

    in reply to: Hidden Message Display #35542
    SteveE
    Participant

    This is probably something Alexander has to fix on the backend, but a temporary fix would be to add a HTML section where you want the message and then add the unique ID to the visible headings or elements section in your rule.

    in reply to: Rules are not correctly applied on load in EditForm #35541
    SteveE
    Participant

    I can’t look at the json, but most likely you have conflicting rules in editform that load with the form. In newform it’s probably base on “change” so it seems to work fine then. I would use “Find In Rules” and highlight the rules that are attached to the same field. If you have more than rule deciding whether it is hidden or not, you need to change the rules or the order of the rules. Turn rules on and off one by one and see what is conflicting and play around with how to get it to behave correctly.

    in reply to: Varying checkbox formats #35540
    SteveE
    Participant

    You can add this to the Custom CS tab to change the size of the box:

    .spjs_boolean_readonly {font-size: 1.6em;}

    Similarly you can play around with changing the other elements by adding them to Custom CS and adding the properties.

    in reply to: Multiple Trigger Validation Rule #35435
    SteveE
    Participant

    I don’t think using rules will be the most effective way to achieve this. I would use some code that you will add to the Custom JS tab.

    One part that didn’t make sense was the second statement because you start with “And” then proceed to “and/or” which doesn’t seem possible. I wrote this assuming the second statement starts with “AND” then proceeds to “OR P are blank”.

    function dffs_PreSaveAction() {

    var Criteria1 = false;
    var a = getFieldValue(“FieldAInternalName”);
    if (a === “C” || a === “D” || a === “E”){Criteria1 = true}

    var Criteria2 = false;
    var l = getFieldValue(“FieldLInternalName”);
    var m = getFieldValue(“FieldMInternalName”);
    var n = getFieldValue(“FieldNInternalName”);
    var o = getFieldValue(“FieldOInternalName”);
    var p = getFieldValue(“FieldPInternalName”);
    if (l === “” || m === “” || n === “” || o === “” || p === “”){Criteria2 = true}

    var Criteria3 = false;
    var x = getFieldValue(“FieldXInternalName”);
    var z = getFieldValue(“FieldZInternalName”);
    if (x===z){Criteria3 = true}

    if(Criteria1===true && Criteria2===true && Criteria3===true)
    {
    alert(“Warning: X cannot equal Z”);
    return false;
    }
    return true;
    }

    • This reply was modified 2 years, 3 months ago by SteveE.
    in reply to: List item record lock #35293
    SteveE
    Participant

    Just that you need to account that when it moves to “Checked Out” that is considered an update to the item so if you have something triggered on “When an item is modified” it will activate the workflow. You can add a qualifier – something like “If Checked Out is not equal to true” but you’ll have to play around with it. In Flow, you can put it in the very first step of the trigger under Settings/Trigger Conditions. It has an odd syntax – something like “@not(equals(triggerBody()?[‘CheckedOut’],true))”.

    in reply to: List item record lock #35289
    SteveE
    Participant

    I like the checkout feature, but one word of caution is if you have a Flow running on it you’ll need to consider how they play together.

    SteveE
    Participant

    Sorry to say, but it’s probably more hassle to set up something to do it in one action than to go through them individually.

    If you go to the installer page and click the Review installations tab, you’ll see all of your configurations. You only need to update the DispForm and you can access them all from this page.

    You could do them all at once and it would probably take an hour. Or you could do the main ones first and then do the rest when you have time or update the form.

    in reply to: Different form for different view. #35214
    SteveE
    Participant

    Native DFFS will do this without additional coding.

    Create a rule and set the trigger to if the toggle is equal to checked. Validate on form load and field change.

    Scroll down and under Visible tabs enter the uniqueID (Tab0) of the tab you want to show when it’s checked. Also under the Hidden tabs you can enter the uniqueID (Tab1) of the tab you want to hide when it’s unchecked.

    That’s why DFFS is so nice – a simple rule can do a lot!

    • This reply was modified 2 years, 4 months ago by SteveE.
    SteveE
    Participant

    I would suggest saving a step of the user having to click the close button and instead have it redirect after editing and clicking save.

    Alexander has mentioned how to do this in a few places, one here: https://spjsblog.com/forums/topic/redirect-based-on-form-values/

    In DispForm under the Misc tab, uncheck “Return to DispForm when editing and item and NOT opening the form in a dialog.”

    Then in EditForm under the Custom JS tab add this to the PreSaveAction:

    function dffs_PreSaveAction() {
    spjs.dffs.redirect(“/yourdefaultview.aspx”,false);
    return true;
    }

    in reply to: Different form for different view. #35201
    SteveE
    Participant

    I think when you say “view” it’s the confusing part (to me at least).

    If you are saying the form changes when you click a button, this can easily be accomplished by creating a toggle and based on if it is set to “Yes/On” the form can make a new tab or section appear.

    If you are saying that based on a list view that you are starting from, when you enter a new item (or then access it in the future) the form will display differently, I have code that will find the view source and alter the form.

    in reply to: Number of Days to Calculate Read Only Due Date Field #35104
    SteveE
    Participant

    First populate the Session Start Date field in the child from the parent using vLookup settings.

    In the child Custom JS section add this code (changing the field names to match yours):

    
    
    function SetDate(){
        var StartDate = spjs.utility.getDateFieldAsDateObject("SessionStartDateFIN");
        var DayNumber =  Number(jQuery("#dffs_NumberofDaysFIN input").val());
        spjs.utility.setDateFieldFromDateObject("TaskDueDateFIN",StartDate,DayNumber);
    }

    Then in the child create a rule that triggers when the Number of Days field is changed and add SetDate in the Run these functions section.

    Your math in your examples doesn’t add up so that part was confusing, but this works for the request in your explanation.

    SteveE
    Participant

    Power Automate doesn’t load the new form in the way that clicking the “New” button does. You’d need to configure Power Automate to populate the fields the same way you have the vLookup fields being populated. It has to be done in Power Automate if you are using that to create the item.

Viewing 15 posts - 31 through 45 (of 56 total)