Alpha DevCon 2018
Results 1 to 7 of 7

Thread: Re-evaluate field rules for a single open record.

  1. #1
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,066

    Default Re-evaluate field rules for a single open record.

    I need to re-evaluate the field rules for the current record only. Can someone help with the syntax?
    I can do it for all records from a button, but I would prefer just the current record.
    Any ideas?
    Ted Giles
    Example Consulting - UK
    .

    https://exampleltd.example-software.com/
    See our site for Alpha Support, Conversion and Upgrade.

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Re-evaluate field rules for a single open record.

    There are no functions to re-evaluate the rules for a single record. If I remember correctly you can use

    tbl = table.open("sometablename")
    'query for the record in question
    tbl.change_begin()
    'don't change anything
    tbl.change_end()
    tbl.close()

    to cause the field rules to be re-evaluated for the queried record. That may have just been the way to recalc the calculated fields. Memory fails.
    Last edited by Stan Mathews; 11-29-2017 at 03:18 PM.
    There can be only one.

  3. #3
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,066

    Default Re: Re-evaluate field rules for a single open record.

    You are probably correct Stan.
    When an image is pinned to an ImageReferenceField, there is no factual Record Save.
    I tried simply Saving and that didn't work.
    TableOpen and resave may well solve the issue. Other than that recalc everything is the only option. Still, small ish table.
    Ted Giles
    Example Consulting - UK
    .

    https://exampleltd.example-software.com/
    See our site for Alpha Support, Conversion and Upgrade.

  4. #4
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Re-evaluate field rules for a single open record.

    Since you are probably doing it on a form (?) try making the onchange event for the form field

    parentform.commit()
    There can be only one.

  5. #5
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,066

    Default Re: Re-evaluate field rules for a single open record.

    Tried the Stan, but then we hit another problem with the interaction between the sql and dbf tables in the set.
    Ongoing work I'm afraid.
    Ted Giles
    Example Consulting - UK
    .

    https://exampleltd.example-software.com/
    See our site for Alpha Support, Conversion and Upgrade.

  6. #6
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Michigan
    Posts
    4,136

    Default Re: Re-evaluate field rules for a single open record.

    Is there one or a couple of field rule in particular that is of interest? If you are having to push a button anyway, could you have the button run a script that perform the same field rule evaluations on the current record?
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

  7. #7
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,066

    Default Re: Re-evaluate field rules for a single open record.

    There are 6 fields Mike, each of which has a field rule attached.
    A script to do that would be good.
    See post#3. There is a Save when an image is selected and I need to get the file path and save it. A Calc expression does it fine and my work around to force a recalc is to clear a logical field which must be ticked to confirm acceptance. This has the effect of a record change, so the rules are recalculated.
    Ted Giles
    Example Consulting - UK
    .

    https://exampleltd.example-software.com/
    See our site for Alpha Support, Conversion and Upgrade.

Similar Threads

  1. Re-evaluate field rules
    By Cheryl Lemire in forum Alpha Five Version 7
    Replies: 13
    Last Post: 08-13-2006, 09:32 PM
  2. reĀ”evaluate field rules
    By dcorcoran in forum Alpha Five Version 6
    Replies: 12
    Last Post: 06-01-2005, 05:24 AM
  3. Re-Evaluate Field Rules
    By Elke in forum Alpha Five Version 5
    Replies: 4
    Last Post: 01-23-2004, 04:25 AM
  4. Re-evaluate field rules
    By Robin Sculthorpe in forum Alpha Five Version 5
    Replies: 2
    Last Post: 10-23-2002, 12:34 PM
  5. Re-evaluate field rules
    By Tony Grimley in forum Alpha Five Version 4
    Replies: 7
    Last Post: 10-31-2001, 08:00 AM

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
  •