Form Display Condition

Hi Everyone,
I have a case management application with tow models.

I would to show First Model to some mobile worker and Second Model to some
mobile workers. Is it possible to do that?

If that not work, I saw that I can put conditions for forms to let them
appear or not by ( Form Display Condition
https://confluence.dimagi.com/display/commcarepublic/Form+Display+Conditions),
is it possible to hid these forms if the login in username is ( test ) for
instance? I tried to put a condition #user/username or #user/userid but I
got an error which is on the attachment.

Thank you very much!
Mahmoud

Hey Mahmoud,

Hi Everyone,
I have a case management application with tow models.

I would to show First Model to some mobile worker and Second Model to some
mobile workers. Is it possible to do that?

You can likely use module filtering
https://confluence.dimagi.com/display/commcarepublic/Module+Filtering for
this.

If that not work, I saw that I can put conditions for forms to let them
appear or not by ( Form Display Condition
https://confluence.dimagi.com/display/commcarepublic/Form+Display+Conditions),
is it possible to hid these forms if the login in username is ( test ) for
instance? I tried to put a condition #user/username or #user/userid but I
got an error which is on the attachment.

I’m not sure about this error, but here is an expression I’m using in a
different app that you can modify as needed (this uses custom user data
instead of the user case but should also be adaptable to use the
usercase): count(#session/user/data/is_test) > 0 and
(#session/user/data/is_test= ‘yes’).

··· On Thu, Oct 20, 2016 at 6:31 AM, Mahmoud Abo Shabo wrote:

Thank you very much!
Mahmoud


You received this message because you are subscribed to the Google Groups
“commcare-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Cory,
You are fantastic!, thanks for your support! It is working and I fix my
issues successfully.

Cheers!
Mahmoud

··· On Thu, Oct 20, 2016 at 3:32 PM, Cory Zue wrote:

Hey Mahmoud,

On Thu, Oct 20, 2016 at 6:31 AM, Mahmoud Abo Shabo almustfa1@gmail.com wrote:

Hi Everyone,
I have a case management application with tow models.

I would to show First Model to some mobile worker and Second Model to
some mobile workers. Is it possible to do that?

You can likely use module filtering
https://confluence.dimagi.com/display/commcarepublic/Module+Filtering for
this.

If that not work, I saw that I can put conditions for forms to let them
appear or not by ( Form Display Condition
https://confluence.dimagi.com/display/commcarepublic/Form+Display+Conditions),
is it possible to hid these forms if the login in username is ( test ) for
instance? I tried to put a condition #user/username or #user/userid but I
got an error which is on the attachment.

I’m not sure about this error, but here is an expression I’m using in a
different app that you can modify as needed (this uses custom user data
instead of the user case but should also be adaptable to use the
usercase): count(#session/user/data/is_test) > 0 and
(#session/user/data/is_test= ‘yes’).

Thank you very much!
Mahmoud


You received this message because you are subscribed to the Google Groups
“commcare-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to a topic in the
Google Groups “commcare-users” group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/commcare-users/i31j3zSM8Ik/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


*Mahmoud Mustafa Abo Shabo *
Bachelor in Information Technology**Master in Web Sciences