Compare two attributes.

Compare two attributes.

  
thanks  Joao Heleno. its working 90%. i gave one feedback  error message for numberinstallations > number licences. but small problum. when i  click the save button first  its save the data normally. with out any error message. when i go for edit , if i save there it is shows the error message. but i want the error message wnen i save the data first.
From your picture I believe you're redirecting to Software_List screen... Instead of having "Mainflow\Software_list" just use an "END" widget.
i tried like that also. but its not working. any other idea?
sattibabu vatti wrote:
i tried like that also. but its not working. any other idea?
 
 I'm not sure I'm understanding what you want... that screen in your pic is it preparation or other action? Can you attach your .oml?
Joao Heleno wrote:
 
 I'm not sure I'm understanding what you want... that screen in your pic is it preparation or other action? Can you attach your .oml?
 
 it is save button. if  i click save button it should give the error message like" NoOfinstallations lessthan NoOfLicences.". the data should not save in the database. it is a save button action unser software webscreen. i attach my oml. please check it.
I'm still confused about what you really want... but in your save action you can add a little bit more logic to your IF.
For instance if you want to validate NumberInstallations > NumberLicences only if it's a new record then add SoftwareId = nullidentifier() and it would become something like SoftwareId = nullidentifier() and NumberInstallations > NumberLicences.

If it's a new record you're saving SoftwareId will be null and than you can work around this fact to do your logic. If it's an existent record the SoftwareId will be filled.
i will explain very clear.
1) in software webscreen  i create a new software.
2) in the create i have two fields .
                               1) number of licences
                               2) number of installations.
the rule is number of installations always lessthan number of licences right.
for example of licences is=25, number of installations is =35.
when i click the save button it should give" number of installations is always lessthan number of licences.".
but it is not giving the error message and data saved successfully in database.
when i click edit and click save , at the time it is giving the erro message." number of installations is always lessthan number of licences.".
but i want the error message when i click the save button first. not after click edit and save.
i done all the action under save button. please check my .oml.

sattibabu vatti wrote:
i will explain very clear.
1) in software webscreen  i create a new software.
2) in the create i have two fields .
                               1) number of licences
                               2) number of installations.
the rule is number of installations always lessthan number of licences right.
for example of licences is=25, number of installations is =35.
when i click the save button it should give" number of installations is always lessthan number of licences.".
but it is not giving the error message and data saved successfully in database.
when i click edit and click save , at the time it is giving the erro message." number of installations is always lessthan number of licences.".
but i want the error message when i click the save button first. not after click edit and save.
i done all the action under save button. please check my .oml.
 
 
I can see your problem now. You see, in the first message, that is in another topic, you had 2 inputs to your webscreen (NrLicences and NrInstallations) and I assumed you we're doing the IF logic with those variables. To use the values of your record you must use the associated variables, SoftwareEdit.Record.Software.NumberOfLicences and SoftwareEdit.Record.Software.NumberOfInstallations.

More, you don't need to pass them to your screen. Just use the Id. For instance you have on your edit link GetSoftware(SoftwareId).Software.NumberOfLicences. Don't do this. You can delete number of licences and installations. The query in the preparation screen of the Software_Edit screen will fetch those values. You just need to know the Id of the record.
 
thanks Joao Heleno,
your logic works 100%. thanks u somuch.


Regards,
sattibabu vatti.