Dynamic forms?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Rem
Posts: 216
Joined: Wed Oct 03, 2007 8:58 am
Location: Sweden
Contact:

Dynamic forms?

Post by Rem »

Is it possible to have dynamic forms?

I mean, if I chose from a dropdownmeny one choice, the form then changes accordingly so only the fileds necesarry is shown below?

/Rem
greg
Posts: 124
Joined: Sat Apr 23, 2005 12:46 am

Post by greg »

You can try playing with READ PROTECT rules. Set up attributes for all possible scenarios on a single form and add object rules like

If BO.Type=`Car` Then
READ PROTECT BO.Bike, BO.Scooter and so on.

Not sure how it will work when a new BO is entered.

greg
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Rem,

You can also see the thread at
http://www.awareim.com/forum/viewtopic.php?t=1885

Pete posted a BSV in that thread that might be helpful for you to import and try.

Tom
Rem
Posts: 216
Joined: Wed Oct 03, 2007 8:58 am
Location: Sweden
Contact:

Post by Rem »

I downloaded Petes BS and got it to work, perfect!

However, when I try the same thing in mine it doesn´t work.

Pete has an attribute called AdminUseOnly, what does that do? I don´t really understand that!

/Rem
pbrad
Posts: 781
Joined: Mon Jul 17, 2006 11:03 pm
Location: Ontario, Canada

Post by pbrad »

Hi Rem,

It seems to be a quirk with Protect and Read Protect that changes to a dropdown list cannot protect or read protect another attribute unless it is a calculated attribute or if at least one other affected attribute on the form is a calculated attribute.

I created the 'Admin Use Only' checkbox attribute as a dummy 'calculated' attribute and I run a dynamic rule against that attribute (default value is 'No' and dynamic rules also set it to 'No') so that when I try to protect or read protect non-calculated attributes at the same time, the protect rules will work.

In this way, you can use this dummy attribute over and over again for any dynamic protection or read protection that you require for non-calculated attributes.

I hope that helps,

cheers,
Pete
Rem
Posts: 216
Joined: Wed Oct 03, 2007 8:58 am
Location: Sweden
Contact:

Post by Rem »

Ok, that is strange. Sounds like a bug to me..

Anyhow, I tested with this trick and it didn´t work, I also tested to make the field I wanted to hide calculated, but it didn´t work anyhow.

So, any more idéas?

/Rem
pbrad
Posts: 781
Joined: Mon Jul 17, 2006 11:03 pm
Location: Ontario, Canada

Post by pbrad »

Dumb question but I presume that you have the rule set to run dynamically? Is it changing the state of the checkbox successfully or is nothing changing?

Pete
Rem
Posts: 216
Joined: Wed Oct 03, 2007 8:58 am
Location: Sweden
Contact:

Post by Rem »

Ah, I figured that out just before you wrote it. I.E., no I hadn´t!

But, now the field disappears (which is good), but the label remains?!

In your example, the entire row disappears, which is what I wan´t. So, any more suggestions?

/Rem
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Post Reply