Results 1 to 2 of 2

Thread: [Answers] Get data mapping and Set data mapping

Threaded View

  1. #1
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,135

    [Answers] Get data mapping and Set data mapping

    Call a function from your 'Get data mapping' and pass in the "{}" or {} (char/num) value as a parameter.
    In your function, check the value (pattern match comparison or character value corresponding to the number, etc.) and return what you want displayed in the cell.
    Your 'Set data mapping' should then set the value you want stored back to the field.

    e.g. this will call the p_mymap function and pass the current character value of the cell:
    Get data mapping:
    Code:
    p_mymap("{}")


    For a Form Section or the Form View of the Grid ('Split grid' or 'Double click to edit') you can use the Data Mapping, e.g.
    Get data mapping:
    Code:
    transform({},"999,999,999.99")
    Set data mapping:
    Code:
    val("{}")


    Q:
    Starting to get to grips with data mapping & thought the obvious place to start was to use it to tidy up data entry - specifically PROPER() for names & addresses etc in fields.
    However :
    Get data mapping -
    Code:
    PROPER("{}")
    Set data mapping -
    Code:
    PROPER("{}")
    doesn't seem to do anything. Do we have to call a function / our function to do the job from Lostfocus() instead?
    We would like to PROPER() the data and refresh each field as the user leaves it.
    A:
    Set data mapping only occurs if you change the data just as a change delegate is only called when you change the data.
    You can write a small admin script to tidy up your data then inside a beforeupdate delegate you can transform input in your live app.



    All topics in [Answers] alphabetically: http://www.lianja.com/community/show...ll=1#post12352
    Last edited by josipradnik; 2016-04-07 at 03:17.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us