Hi all,
Im currently working in traditional web. And im kind of stuck! I got a onchange in my combo box called(productnummer) and in this onchange i have a variable (geldigheid) where i pass in a value. When i debug i can see the correct value is in my variable(Geldigheid).
Now in my form i got 2 containers 1 around "Verkoopbegindtm and verkoopeinddtm" and 1 around "gebruikbegindtm and gebruikeinddtm"
But when i select a productnummer my onchange has to show 1 of the 2 containers depending on the value in geldigheid but it doesnt seem to do anything. And as i see the correct value is passed in my variable and my if statement also should be correct.
Its hard for me to share a oml because this is a big application from work. This is just a page of that application.
I hope somebody could give me a solution, thanks in advance!
Here some screenshots to make it a bit more clear i hope:
Hi @Faissal Berrhout ,
I don't have much experience with Traditional, but I'm not sure referring to the Current record in an OnChange is the correct way to go.
I would think you have to do a listIndexOf first, with as condition id = attribute set as Variable property on the combobox.
Then GetProducts.List[ListIndexOf.Position].Product.Geldigheid will hold the correct value for Geldigheid.
But you are saying geldigheid is the correct value ??? An easy way to make sure of that, is to put the Geldigheid on the screen as expression.
As far as an If not working, that won't happen, in If is an If. Is that If used on a widget inside of your refresh container ?
And a final remark about your If itself, there is really no need for it, you can just use Geldigheid = Entities.Geldigheid.BepaaldBijVerkoop.
If(Condition, True, False) evaluates the same as Condition, and is much uglier and harder to read.
Dorine
Hi,
I have attached the sample OML for you. Hope you are looking for the same.
Regards,
Wasimkhan S
Thank you guys very much! Sorry for my late reaction i didnt see a notification. I've made a solution by making a relation between 2 entitys so my page already knows which geldigheid is chosen. So i dont have to configure a onchange but just put it in the preparation.
@Wasim Khan Thank you i tried that but it doesnt seem to work when i did it unfortunately. Thank you for your time!