on 02-03-2017 5:36 PM
We have a simple fiori app in solman knows as Create Incident, which basically allows end user to report CRM incident. My question is how to make some input fields as mandatory in the Create Incident app ?
In the app, one of the fields (Title) is a mandatory field by default. I would like to make Configuration Item also as mandatory field. Could you throw some lights here on how to do. Please consider, I am a novice when it comes to Fior/UI5 development, so if you could explain me or give me some hints then I would read and figure out 🙂
Thanks,
Vivek
Hi,
I faced with the same task.
I used SAP WEB IDE to connect to my system as ABAP repository.
Then I customized application AI_CREATE_INC by editing files in it (view/Details.controller.js , view/Details.view.xml , i18n/i18nproperties. You need some knowledge in Javascript JQuery.
Then deploy it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello, can you give detailed description how can we do this.
what should i change in files (view/Details.controller.js , view/Details.view.xml , i18n/i18nproperties)?
Hi Vivek,
This should be quite simple to achieve.
In your view, you can locate the property that you'd like to validate as mandatory and set the property required to true. You can then use the change/liveChange event handler of the Input field to set the ValueState to Error if the value is empty.
<Label text="ConfigurationItem" required="true"/> <Input liveChange="onValidate"/>
onValidate: function(oEvent){
var oInput = oEvent.getSource();
if(!oInput.getValue()){
oInput.setValueState("Error");
//optional value state text
oInput.setValueStateText("This field is required");
}
Please note that you will also need to "reset" the Value State, for this you can define a ternary operator to set it either to Error or to None.
oInput.setValueState(oInput.getValue === "" ? "Error" : "None");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Vivek
Could you please let me know the table name to make the "Category" field as mandatory.
Thank you !!
Uday
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Before creating an extension project, please take some time to debug the application. Maybe there is a customization table behind this screen. In HCM fiori app, ther is no documentation, but after some debbuging process we found some customization.
I'm pretty sure it is the same here.
Regards,
Joseph
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Before creating an extension project, please take some time to debug the application. Maybe there is a customization table behind this screen. In HCM fiori app, ther is no documentation, but after some debbuging process we found some customization.
I'm pretty sure it is the same here.
Regards,
Joseph
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Do you managed to solve the problem?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, we have not got any simple solution yet.
you need to extend the application to modify the settings or behaviour of the app. In web use create an extension project for the app and modify it.
Loo up for extension of FIORI app and you will get enough material online .
Regards,
Sharath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To indicate that a field is mandatory, you can set the property “required”. An asterisk will be automatically set in front of the label.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.