BenR

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 53 total)
  • Author
    Posts
  • in reply to: Autocomplete setFields SPFieldMultiChoice #27419
    BenR
    Participant

    Alexander,

    Most excellent! This worked, and a good lesson taught!

    As always, thank you for your support and efforts!

    R’grds – Ben.

    in reply to: Timing issue: Autocomplete vs. Cascade #27376
    BenR
    Participant

    Alexander,

    Oh duh! Your suggestion took very little to get working – though my poor scripting skills slowed me down.

    The solution as you suggested worked perfectly! Thank you so much!

    R’grds – Ben.

    in reply to: Timing issue: Autocomplete vs. Cascade #27371
    BenR
    Participant

    Alexander,

    Yes – I believe your suggested Callback function will do the trick… However, I do need additional guidance.

    I have created an additional field, TemporarySubLOB, to capture the AutoComplete Tier-2:SubLOB value via setFields. When the Tier-2:SubLOB field is ready, I would like to move the value of TemporarySubLOB to it.

    
    
    // Set value to Cascade to address timing of Tier-2 (SubLOB)
    function spjs_casc_ready(id, readyFIN, index) {
        var config = spjs.casc.data[id];
        var filterValue = getFieldValue(config.thisListFields[(index - 1) > - 1 ? (index - 1) : index]);
        // Add your custom code here - like this example
        if (readyFIN === "SubLOB") {
            setFieldValue("SubLOB", "TemporarySubLOB");
        }
    };

    Do I just add the suggested function to Custom JS, or do I have to invoke it from a Rule? If I invoke it from a Rule, what parameters do I pass? I don’t see a id or index value in the Cascade debug information.

    As always, I really appreciate your support and efforts!

    R’grds – Ben.

    in reply to: Autocomplete, Sort, Source List Over 1,000… #27311
    BenR
    Participant

    Alexander,

    I’m sorry to say that my analysis of the problem was false… As I continue to test, I’ve found that the number of items in the source list is not the cause of the problem (just a difference between my DEV to PROD environments) – sorry for the false lead.

    The problem is with the result sorting the ID field (which is a number field) is not following numerical sort (sample result: 100, 150, 2, 25, 3, 55, 550).

    Reading about SPJS-Lookup, you address this symptom in the customSort option, describing: “… This sort function example sorts values that contains numbered options from 1-10. The default alphabetical sort order would sort like this: 1, 10, 2, 3 etc., but now it will show 1, 2, 3 …”

    Is a numerical sort possible in Autocomplete?

    Again, sorry for the false lead.

    R’grds – Ben.

    in reply to: Tooltip sizing post 4.4.4.4 #26659
    BenR
    Participant

    Alexander,

    This correction in v4.4.4.5 has addressed this issue nicely!

    I found that I did not need to use the width override at all – your default method of width calculation worked quite well for my Tooltips throughout my forms (both short and long, multiline Tooltips).

    As always, your support and efforts are appreciated!

    R’grds – Ben.
    P.S.: I’ve now upgraded to v4.4.4.5 in production!

    in reply to: Rules: Set field value post 4.4.4.0 thru 4.4.4.2 #26526
    BenR
    Participant

    Alexander,

    I’ve tested with DFFS_v4.4.4.4_2019-07-08 released today…

    My symptom was caused by Rule execution order, and v4.4.4.4 does remove the symptom.

    The Rule execution order does not match v4.4.3.65, where it appeared that rule order simply followed index number 1,2,3,4. It appears that in v4.4.4.n, rule order seems to be FALSE ascending then TRUE ascending – but this is my unfounded guess. (Screen shots follow comparing two versions…)

    At the end of the day, this symptom is resolved! As always, thank you for your support and efforts!

    R’grds – Ben.

    in reply to: Rules: Set field value post 4.4.4.0 thru 4.4.4.2 #26489
    BenR
    Participant

    Alexander,

    The field that displays the symptom is [Commodity Type]. This field is cleared in Rule-1, and set in Rule-3. However, Rules-1,-2,-3,and -4 are triggered on a different field called [LOB].

    Full Rules screen captures follow.

    R’grds – Ben.

    in reply to: Rules: Set field value post 4.4.4.0 thru 4.4.4.2 #26480
    BenR
    Participant

    Alexander,

    Could the fact that the trigger field is the first-tier of a two-tier cascading dropdown contribute to this issue?

    R’grds – Ben.

    • This reply was modified 4 years, 8 months ago by BenR.
    in reply to: Rules: Set field value post 4.4.4.0 thru 4.4.4.2 #26477
    BenR
    Participant

    Alexander,

    I hope this is the Trigger section of the four rules. If not, please advise.

    R’grds – Ben.

    in reply to: Rules: Set field value post 4.4.4.0 thru 4.4.4.2 #26467
    BenR
    Participant

    Alexander,

    Your suggestion to investigate the Trigger Map led to more information…

    What I noted: I have four Rules 1, 2, 3, & 4. Each rule triggers on Load and field change, and each rule is non-reversing.

    • Rule 1 clears the value of CommodityType
    • Rule 3 sets the value of CommodityType

    If Rule 3 is true, and the rules are fired in that order, I should find a value in CommodityType. My symptom is that Rule 3 is true, but I find no value in CommodityType.

    Setting each of the rules to debug, I load a form and set the field that makes Rule 3 true. The attached images display debug Rule trigger order.

    For 4.4.3.65, you see 8 rule triggers, 4 on load, 4 on change. Further, you see the order of 1,2,3,4 on load, and 1,2,3,4 on change.

    For 4.4.4.4, you see 3 on load, 4 on change. Note the order of 2,3,4 on load, and 2,4,3,1 on change – this places Rule 3 (set value to CommodityType) before Rule 1 (clear value from CommodityType) – which matches my symptom.

    From this, I believe the root cause is that Rule execution order in 4.4.4.4 is in error.

    R’grds – Ben.

    BenR
    Participant

    Alexander,

    Thank you – you never disappoint! This method is exactly what I needed, and a good lesson. As always, I appreciate your support and efforts!

    R’grds – Ben.

    BenR
    Participant

    Alexander,

    Sorry – I have been unclear… The problem is in the formatting of the result as a string.

    In this example, the resultant string is correct – but formatted poorly:

    setFieldValue("mySPFieldText",getFieldValue("mySPFieldUserMulti");

    If mySPFieldUserMulti contains two names, that value is set to the string field mySPFieldText separated by a comma and is where the poor formatting comes in. Like this: mySPFieldUserMulti contains two names:

    • Doe, Jane
    • Public, John

    The result in mySPFieldText will be:

    Doe, Jane,Public, John

    Note that there is no space after the comma between Jane and Public. This is the same result if I use a rule to set the field value.

    What I would like to achieve is the result string to be formatted as

    Doe, Jane; Public, John

    Note that there is semicolon-and-space used to separate the two values.

    Thank you for your consideration.

    R’grds – Ben.

    in reply to: If no child exists, create child from parent… #24790
    BenR
    Participant

    Alexander,

    Okay – just drop the mic! Beautiful, beautiful work – worked on my first try, and filled my every requirement.

    You, sir, are the maestro!

    Many thanks, R’grds – Ben.

    • This reply was modified 5 years ago by BenR.
    • This reply was modified 5 years ago by BenR.
    BenR
    Participant

    Alexander,

    Nicely done! This suits my application perfectly!

    Hats off to you sir – I always appreciate your support and efforts!

    R’grds – Ben.

    BenR
    Participant

    Alexander,

    I am still using this method, though I am on all current versions… I would like to change the format of the date & time to match what is displayed in the Created and Modified fields – for me, I see: “Created at 3/25/2019 11:06 AM”

    I am using: c = spjs.dffs.buildValStr(“{timestamp[M/d/yyyy hh:mm]}”); which gives me: 3/29/2019 3:07.

    How can I get the AM / PM portion?

    As always, I’m so appreciate your support and efforts!

    R’grds – Ben.
    Reference: Dynamic Forms for SharePoint v4.4.3.64 – March 13, 2019|CSS version: 4.46 / 4.46|spjs-utility version: 1.332

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