Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Matt Brownell 4 posts 24 karma points
    Jun 05, 2018 @ 22:15
    Matt Brownell
    0

    NuPicker with Archetype - Using value from another nuPicker to drive typeahead content of different nupicker

    Hey all, Hopefully this is an easy question.

    I'm using 7.10.4 and installed nuPicker 1.7.0. I have a page whose intention is to allow an admin to enter in a bunch of promo codes and associate them with custom discount codes and derived values (soliciation codes, etc.). i'm using a single node with a list of Archetype datatypes. For each Archetype datatype, there are three properties: 1 is the text-entry for the promocode. 2nd is a type-ahead nuPicker that returns all custom discountCodes we have in a database. 3rd is a typeahead nuPicker for what we call a solicitation code that is also pulled from our database. my problem is to get the solicitation code list, i need to submit the previously selected Discount code from the 2nd step.

    i'm using dotNet typeahead selector and putting my code in an appcode file. i see my appcode file has the nodeId submitted in. however, my one nodeId (doc) could have over a hundred Archetype objects on it, each with their own promocode/discountcode/solicitationcode combos. I'm wondering if there is a way to identify which nuPicker is being used on a page (a unique id or something?) so i can search the doc for nearest discountcode or do i need to write a custom datatype for all this.

    Thanks for any pointers!

  • Matt Brownell 4 posts 24 karma points
    Jun 07, 2018 @ 19:25
    Matt Brownell
    0

    well, still didn't solve teh above problem directly. Just to move my project forward, I opted for a 'master' doctype that has a bunch of children (the master will display children in custom listview). Each child node has only a single instance of the nuPickers on it. I can then use the contextId (nodeId) to go and get previously saved values.

    Requires my discount admin to enter in a DiscountCode then save the page. Then any other nuPickers can use that value to populate their own lists. Not perfect but good enough.

Please Sign in or register to post replies

Write your reply to:

Draft