Easy to Create, Easy to Change - Easy to use!


form open related layout more than 1 to view = no fire Setanything() on return data to


Started by Simon B
Search
You will need to Sign In to be able to add or comment on the forum!

form open related layout more than 1 to view = no fire Setanything() on return data to

Getting on

Getting on ok with De8, but currently struggling to get SetColor() or SetState() to fire without hitting save.

On the database I'm using, if I lookup (form open related) from my order form, select the record i want and return data to my order form it works correctly and everything is firing and field colours change immediately on retuen data to.  But, If you change the related form layout from 1x1 to 2 or more (records per screen), then setcolor() or setstate() in virtual derived fields DON'T fire, until I hit save.

'Virtual fields will be fired on Load, Save, Refresh and if a field they depend on has changed. If not they will not change or re-calculate.'

On Load, on a blank screen, rgb1 virtual field is derived and shown as R240G240B240.

Lookup at item (form open related) I want to order and rgb1 value correctly CHANGES and shows as R150G255B150.

A control field gets colour for its derivation from rgb1.  As rgb1 value has changed from R240G240B240 to R150G255B150 my control field derviation should fire. 

The colour of my field stays grey (R240G240B240) until I hit save.  I put a button on my form to RefreshScreen() to see if the changes are not showing, even though they should based on dease rules, but to no avail.  How do I make things fire without saving??  I'm using derived vuirtual fields, virtual field values are changing, other virtual derived fields dependant on the value from another virtual derived field should fire based oall this.  I don;t know what is wrong.

various text fields, (hist_d1, hist_s1 etc) virtual

derivation lookup along the lines of: lookup "entry2ordrecnos" "hist_d1"

rgb1 text field, 12chrs, virtual

Derivation: if (lookup "entry2ordrecnos" "rgb1" = blank,"R240G240B240",lookup "entry2ordrecnos" "rgb1" )


control field, virtual, text , 1 character long. 

Derivation:

concat(
SetColor("hist_d1","-1",rgb1,"-1"),
SetColor("hist_s1","-1",rgb1,"-1"),
SetColor("hist_t1","-1",rgb1,"-1"),
SetColor("hist_idn1","-1",rgb1,"-1"),
SetState("histc01",0)
)

Wrote from scratch a test database and it does the same, with a slight difference that 1 of 4 fields changes colour like it should before hitting save, he other 3 stay grey until saved, even though part of the same derivation on the control field.  Moving position of the one that's changing in the derivation makes no difference.  So nothing to do with my database being 7.x converted to 8.x.

Any thoughts ?  I've tried derivation on my fields, in control fields, and the same happens, if I lookup to a related form and the related form shows 2, 3, 4 ... 20 records per screen, then things do not fire on return data to, only fires when the realted form is 1 record per screen.

Written by Simon B 17/02/15 at 10:23:18 Dataease [{8}]FIVE

Re:form open related layout more than 1 to view = no fire Setanything() on return data to

A little sample that show what you want is the best way to get a good response. We can't sit down and re-create this ourselves, and I don't think any of the users will have time to do that either.

But in General:

Each row in a multi-record form is a clone and has its own objects. This is why we added the # in all Set Functions.

so if you have 10 records in a form being a subform or a multi-row main form, it will be the same. You can manipulate any one of them, or all of them but you have to do the programming.

We are looking into adding * in Set Functions too, so you can set all the matching OBJECTS but this is on the todo list still.

The upside is of course that you can add zebra look to a table and change the objects in the row you select etc. If it changed all the objects in all rows all the time, it would not be useful.

Written by DataEase 19/02/15 at 15:00:21 Dataease [{8}]FIVE

Re:Re:form open related layout more than 1 to view = no fire Setanything() on return data to

i said I'd done a test, I thought it 'd put some code up first to see if there was something glaringly obvious.  My mistake not just uploading it.

Open attached database DEMO 01.  Username and password are blank.  Open 'orderform' and follow the instructions on the form.

Notice how the control fields SHOULD colour the history fields.  Depending how you return the data to this form gives different results to how this code is fired. 

Ignore most the other forms, this is a new database from scratch for demo purposes but dataease now includes lots of it's own demo data every time you create a new database.

Written by Simon B 20/02/15 at 10:06:03 Dataease [{8}]FIVE

Re:Re:Re:form open related layout more than 1 to view = no fire Setanything() on return data to

What would life be like if we couldn't find a reason to tell you off Simon ;-)

DataEase 8.x create new apps from Templates. The default template contains a lot of "rubbish" because it is the best way to promote new features (from a demo viewpoint).

But it also contain other templates, including my favourite: Clean.

Simply create new apps from that one and you will not get anything but SysInfo which is always useful (for me atleast) as I have 100 copies and it is also nice to know where the app I am working on is actually located etc.

All the best, your contribution is invaluable and you know it ;-)

Written by DataEase 20/02/15 at 10:32:03 Dataease [{8}]FIVE

Re:Re:Re:Re:form open related layout more than 1 to view = no fire Setanything() on return data to

Hi Simon. Just so you don't think we ignore you ;-)

In general, I can say that you have a tendency to make simple stuff slightly "complex".....

The combination of PRISM logic and GUI logic can get entangled if you rely on the firing in a long chain which is basically what you do here.

We will spend some time "decoding" what you try to do for the fun of it, but I think the best thing we can do for you is to re-design it to the simplest level for future reference. 

Give us some more time as we are a little snowed under at the moment.

Written by DataEase 21/02/15 at 11:54:36 Dataease [{8}]FIVE

Re:Re:Re:Re:Re:form open related layout more than 1 to view = no fire Setanything() on return data to

Thank you :)

I look forward to seeing how changing field colours SHOULD be done :D

I think me making simple stuff slightly "complex"is down to not having instructions/rules to follow so winging it and also using the forum until i find something/anything that seems to work lol.  Take setting the colour, the instructions and demo all relate to objects (buttons), fields have to be done differently but nothing to say how lol.

I wouldn't try to decode my logic, like you said be easier to just show a way of doing it more logically :D

Dread to think what you'd make of some of my scripts pmsl :D

Written by Simon B 24/02/15 at 16:52:51 Dataease [{8}]FIVE

Re:Re:Re:Re:Re:Re:form open related layout more than 1 to view = no fire Setanything() on return data to

Glad you agree ;-)

One thing takes the other and suddenly we have a long chain of workarounds....he,he

You will find that we have updated the Help for all new functions on our website since we last spoke. We will soon add a runnable sample for each one too to make it easier to see in action.

You can read on all the great improvements here:

DataEase 8.5 - What is new! (Page 1) - Roughly 8.1

This is the first page of 3 where we recapitulate the Blog entries made by our development team through the development from pre 8.0 to 8.5. We have edited and updated the entries, but the appear in the order they were made and with the ideas, experienc...

DataEase 8.5 - What is new! (Page 2) - Roughly 8.2

This is the Second page of 3 where we recapitulate the Blog entries made by our development team through the development from pre 8.0 to 8.5. We have edited and updated the entries, but the appear in the order they were made and with the ideas, experien...

DataEase 8.5 - What is new! (Page 3) - Roughly 8.5

This is the third page of 3 where we recapitulate the Blog entries made by our development team through the development from pre 8.0 to 8.5. We have edited and updated the entries, but the appear in the order they were made and with the ideas, experienc...

NEW! ?Functions in DataEase 8.0 to 8.5 (Page 2)

Some of you might be aware of it but it seems a lot isn't so it might be time to advertise a little the vast number of new functions and functionalities that has been added to DataEase 8.0 through 8.5. For a long time the only way new functions found the...

NEW! Functions in DataEase 8.0 to 8.5 (Page 1)

Some of you might be aware of it but it seems a lot isn't so it might be time to advertise a little the vast number of new functions and functionalities that has been added to DataEase 8.0 through 8.5. For a long time the only way new functions found the...



In the meantime we will create a sample that will illustrate "best practice" .... Love buzz words! NOT!

Written by DataEase 24/02/15 at 17:19:52 Dataease [{8}]FIVE