Announcement

Collapse
No announcement yet.

Succsss / Fail variable on custom field read and write items

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Succsss / Fail variable on custom field read and write items

    I really wish there was a success / fail variable on the custom field read and write items.

    Example:
    <mvt:item name="customfields" param="Write_Customer_ID( l.settings:member:id, 'loyalty_tier_name', l.settings:loyalty_tier_name )" />

    to

    <mvt:item name="customfields" param="Write_Customer_ID( l.settings:member:id, 'loyalty_tier_name', l.settings:loyalty_tier_name, l.success )" />

    or something... but you know what I mean
    Colin Puttick
    Miva Web Developer @ Glendale Designs

    #2
    well, there's

    <mvt:item name="customfields" param="Read_Customer_ID( l.settings:member:id, 'loyalty_tier_name', l.settings:loyalty_tier_name )" />

    but yea, a boolean result value would be handy
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      yes. an actual Boolean result is what I'm asking for. Being able to read it doesn't mean it actually worked when writing in all scenarios, especially when getting data from external sources in the first place.

      ...anyways, I'm dreaming here right? This is the "dream features" forum.
      Colin Puttick
      Miva Web Developer @ Glendale Designs

      Comment


        #4
        Originally posted by dreamingdigital View Post
        yes. an actual Boolean result is what I'm asking for. Being able to read it doesn't mean it actually worked when writing in all scenarios, especially when getting data from external sources in the first place.
        Ok, ran out of coffee this morning and awaiting backups...but how can doing a read not give you the definitive answer? I haven't tried it, but pretty sure if your input variable is empty, the Write() function would be 'True'...even though the field is empty. So, i suspect what you really want is maybe a tri-state return:

        1 = True: Value Written
        0 = False: Function failed. Most likely because the declared custom field was incorrect.
        -1 = Value Written was null.

        Although, since the 'false' case would only occur in development - unless someone deletes/changes the custom field, we could go back to boolean and the 0 represent "Null Value" written. Again, you can create your own test for this, but yea, having it in the function would streamline things.

        Bruce Golub
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment


          #5
          yup, hence the "dream" feature. :)
          Colin Puttick
          Miva Web Developer @ Glendale Designs

          Comment

          Working...
          X