Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Field changes detectection for a whole Layout


This topic is 6711 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted (edited)

Hello,

I would like to know if some one is using an easy way to detect if some field in a layout has been modified. (I.e. using the eval function).

I´m actually using calculation fields for every field that I want to track, but this is hard to use in layouts which has a lot of fields inside them.

(sorry for my english)

Thank you in advance.

Edited by Guest
Posted

Hi Boreal, welcome,

How about a recursive custom function for this? I am assuming that your calculations are the same for all fields, with just the layout and field names different? Write it as a CF and use the design functions to get the parameters to pass to it.

*I just read a second meaning in your post. Could you clarify if you are trying to detect if a field on a layout has been modified (in layout mode), or if data in a field has been modified (browse mode)?

Cheers,

-Raz

  • Newbies
Posted

Thank you for your answer Raz,

What I´m trying to do is to detect if there are any "not empty" field in a layout (in browse mode) has been changed in order to put a "checked" icon in a container field. This would be used to show to the user that this form has been modified. The Idea is to bring to the user in a quick view "what layouts has been completed" in order to help them to complete those layouts that would be forgoten.

I tried to follow your suggestion but I don´t know how can I check using a script, if there are any field of the "current layout" who has it contents "not empty".

I try to make something like this:

set variable[$fieldsinlayout;fieldnames(get(filename);get(layoutname)]

set variable[$c;value:1]

set variable[$limit;value:pattercount("-carriage return-";$fieldsinlayout]

set variable[$notempty;value:0]

loop

-- and that the line that I wish to solve

if(isempty(getvalue($fieldsinlayout);$c);$notempty;1)

exit loop if $c>$limit

end loop

What I would like (if I were in "neverland") is to find the way to evaluate the content of the field that I get in getvalue($fieldsinlayout);$c) instead to get only the name of the field; thats why I have been trying to use something like "evaluate" but I don´t know how to do it.

mmm... I don´t know if may explanations would bring you an awful headhache but anyway thank you for your time.

Regards.

Posted

You can do this via a loop script using the evaluate, getfield and now GetLayoutObjectAttribute (new with 8.5 - I haven't tested it yet, but I suspect GetLayoutObjectAttribute would be the slowest).

But a calc field would be easier I think.

How about creating 2 repeating fields from a context that has access to the table records you want to check (and is located to avoid update issues)???

FieldList

(global text repeating)

FieldCheck:

Case(IsEmpty(Extend(GetField(FieldList))); 1)

Number calc repeating

FieldList would hold the TO::FieldName of each field you want to check. Your check box could be something like:

case(count(Fieldcheck)>0; "In Progress"; "Completed")

You could also forgo the checkbox and use FieldList as a Key for a visibility relationship that just pops up a graphic or field without having additional calcs or scripting involved.

-Raz

This topic is 6711 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.