Leonid

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 58 total)
  • Author
    Posts
  • in reply to: Child form #31550
    Leonid
    Participant

    Just tested hiding the vlookup button. Brilliant!

    in reply to: Child form #31454
    Leonid
    Participant

    Alex,
    For the snippet

    
    
    function vlookupChildAddedCallback(){
        var res = spjs.utility.queryItems({
            "listName": "DISPLAY_NAME_OF_CHILD_LIST",
            "query": "<Where><Eq><FieldRef Name='_vLookupParentID' /><Value Type='Text'>"+getFieldValue("_vLookupID")+"</Value></Eq></Where><OrderBy><FieldRef Name='ID' Ascending='FALSE' /></OrderBy>",
            "rowLimit": 1,
            "viewFields": ["ID"]
        });
        if(res.count > 0){
            var newItemId = res.items[0].ID;
            setFieldValue("THE_FIELD_YOU_WANT_TO_SET", newItemId);
        }
    }

    Seems setFieldValue works only if SAVE button clicked on Edit form of the Parent item. Any way to set the field value w/o forcing user click Save?

    in reply to: Child form #31371
    Leonid
    Participant

    I redid the whole thing with new lists and sofar prefill is working

    in reply to: Child form #31369
    Leonid
    Participant

    I posted 2 replies and none made it to this thread

    in reply to: Child form #31343
    Leonid
    Participant

    Alex,
    The issue is with vlookup: fields not pre-filling in the Edit form whereas they prefill in the New form, same configuration

    • This reply was modified 3 years, 8 months ago by Leonid.
    in reply to: Child form #31329
    Leonid
    Participant

    Any luck in pointing me to right direction?

    in reply to: Child form #31311
    Leonid
    Participant

    Alex, Im emailing snapshots and vLookup config to your gmail.
    Im running 4.4.4.23 DFFS Loader with 1.1.19 Lookup

    in reply to: Child form #31305
    Leonid
    Participant

    Alex, the other question came up. I copied vLookup settings from New to Edit form.
    Prefill values in child works fine in the New form, but doesnt in the Edit form. Is there some settings that should be adjusted?

    in reply to: Child form #31303
    Leonid
    Participant

    Got it. I will set the field visible and hide it on form loaded instead. Hope that will work

    in reply to: Child form #31266
    Leonid
    Participant

    The only function related to vLookup is:
    `function vlookupChildAddedCallback(){
    var res = spjs.utility.queryItems({
    “listName”: “LCR Answers”,
    “query”: “<Where><And><Eq><FieldRef Name=’_vLookupParentID’ /><Value Type=’Text’>” + getFieldValue(“_vLookupID”) +
    “</Value></Eq><Contains><FieldRef Name=’FileRef’ /><Value Type=’Text’>” + LCR_ID +
    “</Value></Contains></And></Where><OrderBy><FieldRef Name=’ID’ Ascending=’FALSE’ /></OrderBy>”,
    “rowLimit”: 1,
    “viewFields”: [‘ID’, ‘Title’, ‘FileRef’],
    “scope”:”RecursiveAll”
    });
    if(res.count > 0){
    //debugger;
    var id = res.items[0].ID;
    var title = res.items[0].Title;
    setFieldValue(title.replace(” “, “”) + “ID”, id);
    }
    }

    and the rule is attached

    • This reply was modified 3 years, 8 months ago by Leonid.
    Attachments:
    in reply to: Child form #31217
    Leonid
    Participant

    Alex,
    The button visibility is driven only by the Rule on the dropdown.

    in reply to: Child form #31204
    Leonid
    Participant

    That worked like a charm!

    Im facing sort of rendering issue with multiple vLookups. Sometimes only 1st button shows up. 2nd vlookup button will show if I click the one shown and then close the dialogue

    Attachments:
    in reply to: Child form #31195
    Leonid
    Participant

    Thanks Alex! To clarify vlookupChildAddedCallback(): Im using folders with vLookup. CAML query should have a recursive scope to go through the folders (?). How this can be accomplished with

    spjs.utility.queryItems
    in reply to: Child form #31152
    Leonid
    Participant

    Thanks Alex, I will try that! What is the best event to add the code in New form to ensure it fires right after the Child item created?

    Followup questions:
    I need multiple associations: whats the naming rule for _vLookupID? e.g. _vLookupID1, _vLookupID2, etc.

    Do I understand correctly that if I use regular item IDs those wont work in Edit form to show proper relationship between Parent and Child. Thus OOB lookup wont work

    in reply to: Child form #31149
    Leonid
    Participant

    Continuing with mono- discussion. It appears that ID is not item ID but randomly generated unique ID prior to item creation, and it works. I still need to save child item ID in a parent list because parent list has multiple association with the same child list and reverse ralationship is much simpler.

    The other question, whats the best way to make Add Child Record button conditional? E.g. I want to show it only when there is no records in the child list matching query

Viewing 15 posts - 1 through 15 (of 58 total)