Hiding a subform based on field value.
Dear Friends!
I am trying to hide one subform when I have certain value in text field. I tried following code but it didnt help me at-all. will it be possible for you to show my my mistake.
the business case is I am not supposed to display Form 16 related information in payslip when payroll areas are 13 & 14 for other payroll areas form 16 should display. here subformname is Form16.
code:
data.#pageSet[0].Page1.Form16.Form16::ready:form - (JavaScript, both)
IF(data.page1.payslipheader.GV_ABKRS.rawValue == 13);{
Form16.presence = "hidden";
IF(data.page1.payslipheader.GV_ABKRS.rawValue == 14);{
Form16.presence = "hidden";
above code is not hiding Form16 subform.
thanking you
Regards
Naim
Hi Soumik,
that is a easy issue. Create a condition, where you ask the value, if it is initial.
In this discussion, exact your question is solved.
Adobe forms: Hide table rows based on data
or here is another way to solve your issue
Hiding a table column for a particular condition
This is the code you need:
if ( this.yourvalue.rawvalue == " " )
this.presence = "hidden";
Please use the search, which is located in the upper right corner of SCN before open a discussion.
Here you can learn more about it:
How to use SCN search
Regards
Florian
Similar Messages
-
Hot spot for field based on field value
Hi,
Im using ALV list to display report. And I have enable hot spot for that field based on field value. For example, If the field has value " 0 " then hotspot should be enabled for that field. If the field has value " 1 " then it should be displayed as normal field without hotspot.
Can anyone tell me how to do this?
Thanks,
AmalHi Amal
Do this
In your final internal table
add a table type
gi_cellstyles TYPE lvc_t_styl
Then (while populating output)
FORM prepare_edit_output.
* say your field is 'field'
DATA : lw_stylerow TYPE lvc_s_styl,
li_styletab TYPE lvc_t_styl.
IF gw_output-field = '0'.
CLEAR lw_stylerow.
lw_stylerow-fieldname = 'FIELD'.
lw_stylerow-style = cl_gui_alv_grid=>mc_style_hotspot.
APPEND lw_stylerow TO li_styletab.
ELSEIF gw_output-field = '1'.
CLEAR lw_stylerow.
lw_stylerow-fieldname = 'FIELD'.
lw_stylerow-style = cl_gui_alv_grid=>mc_style_hotspot_no.
APPEND lw_stylerow TO li_styletab.
ENDIF.
INSERT LINES OF li_styletab INTO TABLE gw_output-gi_cellstyles.
ENDFORM.
In your layout building
gw_layout-stylefname = 'GI_CELLSTYLES'.
Pushpraj -
Brf+ workflow configuration based on field values of UI
Hello Experts,
I would like to know if we can configure the BRF+ workflow steps for material to go to certain users based on certain values from UI fields . For example a particular material type (FERT) should go to specific processor . Can I add material type column in BRF+ for materials and assign specific material type values and assign users to that step. Is this possible?.
Thanks.This is one of the most common questions. It will save you time if you perform some research before asking. Any way, review this document: How to-Master Data Governance for Material: BADI USMD_SSW_RULE_CONTEXT_PREPARE to Enhance User Determination which addresses your exact question.
Also, for any future MDG questions, please take a look first at this document Configuration and Enhancement of SAP Master Data Governance as it contains many of the commonly required enhancements. -
Hide one row on Advanced List Pane based on field value
Hello everyone,
I have a question for you:
Is it possible to hide one row on an Advanced List Pane based on the value of a field of that row?
Here is the actual case:
I have a custom B.O. called "Product Group". This B.O. has an Internal ID and a Description at Root level.
In this B.O. I have a One-Too-Many node called "Descriptions".
On the T.I. of the Product Group there is a tab called "Other Languages". On this tab a user can provide translations for numerous languages for the Product Group Description.
When you create a new Product Group a translations is automatically added for the Current User Log On Language.
Now I want to hide that row in the Advanced List Pane and only show the translations where the "Target Language" is DIFFERENT from the Current User Log On Language.
So in the screenshot above you see we have 3 translations: "Bébé" (FR), "Baby" (EN) and "Bebé" (ES).
Now I want to hide the "Baby" (EN) translation if the Current User Log On Language is English, hide "Bébé" (FR) translation if the Current User Log On Language is French, etc. ...
The Advanced List Pane is currently bound to Descriptions node.
Thanks & Regards,
GlennHello Glenn,
Please refer the below video.
SAP Cloud Dev: Extensibility and Dynamic UI - Part 1 - YouTube
Here Dynamic UI is achieved for input field. You can create transient radio button for each possible records, check the User Logon Data and uncheck the radio button specific to it.
Regards,
Chandan -
Mapping requirment based on field value
Hi All,
I have a mapping requirement
where in the file i have a 2 AM records as shown
AM U 00000000000010000C
AM X 00000000000120000
Based on AM-03 field i..e,, AM-03 = 'C'
then to the target field i need to pass the value(00000000000120000) of next AM02 record.
so when ever AM03 filed is 'C' then i need to pass the value of next AM record.
can any body suggest me how i it can be acheived.
Thanks
Sai_SHAi am not sure whether i have understood ur req correctly or not..
but u can chk this UDF in ur mapping:
execution type: all values of a context
if(var1[0].equals("C"))
result.addValue(var2[1]);
filed3---removecontext
UDF----target
field2---removecontext -
Required Fields based on field value
I am using Acrobat 9.1 Std. This is what I am trying to accomplish I have four text fields that I want to make required based on the selection of a radio button group.
I have two radio buttons on the form w/ the same name w/ the button value set to Yes for one and No for another. If the radio button w/ value Yes is selected I want to set the four text fields to required. If the radio button value is No the text fields should be optional.
Ive found similar postings for what I am trying to accomplish; however, I havent had any success in getting it to function correctly.Some more information on what I have tried..For simplicity Im just trying to get one text field to work, then I can repeat the java code for the other text fields.
In acrobat Standard 9.1 I go to Forms Add or Edit Fields from there I select the radio button group (contains two radio buttons) on the left column and select properties. Then on the radio button properties dialog box I select the Actions tab. Set the Trigger for Mouse Up and the Action for Run a JavaScript . I click the Add button and enter the following into the JavaScript editor:
if (this.rawValue == "Yes") {
TextField1.validate.nullTest = "error";
xfa.layout.relayout();
else {
TextField1.validate.nullTest = "disabled";
xfa.layout.relayout();
I then close the JavaScript editor, save the form and re-open to test it. I select the radio button w/ value Yes and click the Submit button and the form goes on to submit. At this point I would expect it to error because I didnt fill in any value for TextField1.
I also tried altering the field tag with the below java:
if (this.rawValue == "Yes") {
TextField1.mandatory = "error";
xfa.layout.relayout();
else {
TextField1.mandatory = "disabled";
xfa.layout.relayout();
This also didnt work. Im not sure if I am using the correct tag or not or why I am unable to get the text field to become required for submission.
Any help would be greatly appreciated.
Thanks, -
HIDING A SUBFORM BASED ON CONDITION
Hi experts,
My requirement is i have created one body page that body page is flowed and type western text
and i have two paragraph , in between this two paragraph i have one table. table alignment is not
left most so i have created one text to adjust this alignment
so the
| 1. para ...................................................................................................|
| blank text | table |
|2.para ...........................................................................................................|
so now when there no value in table it is creating a gap in between two paragraph.
i don't no much more abt java script and formcalc please suggest me . any solution for that............Hi Soumik,
that is a easy issue. Create a condition, where you ask the value, if it is initial.
In this discussion, exact your question is solved.
Adobe forms: Hide table rows based on data
or here is another way to solve your issue
Hiding a table column for a particular condition
This is the code you need:
if ( this.yourvalue.rawvalue == " " )
this.presence = "hidden";
Please use the search, which is located in the upper right corner of SCN before open a discussion.
Here you can learn more about it:
How to use SCN search
Regards
Florian -
Restrict OVS Entries Based on Field Value
Hello everyone,
I've had a look at this section of the SCN for help before posting here --- none seemed to quite fit the bill. Apologies if pre-existing help for this already exists.
I'm modifying the 'projects' WorkCentre for a customer: they have a Customer Contact field which I've added to both the project creation and project overview screens, and turned into an OVS which was easy. They now have an additional requirement --- filter that OVS based on the company named as the buyer on the project creation screen. In theory it's pretty simple --- only show those contacts who have the same company as field X --- but I can't figure out how to go about it. Is there a simple bit of Ruby script to filter this? Do I need to create a custom OVS and do some ABSL scripting? Any help would be appreciated.
LewisDid it!
Tried as Fred suggested and tested it on a custom screen, which worked. Process was thus:
I used the Company OVS which was in publicovs/organisationalcentreid because others caused issues, but this might not be the case for others. In the system I was using, the OrganisationalCentreID of the company I was testing against was a different length ('1000' instead of the expected '10000000') than the BusinessPartnerInternalID associated with it. This is why the second element is needed. Using AfterModify coding, I did the following:
This gets the BusinessPartnerInternalID of the company, which is the same as the RelationshipBusinessPartnerInternalID field used in the Contact OVS. Using the parameter binding I just matched up these two and voilà. One can also make the second field invisible so one doesn't clutter up their UIs.
There is I believe a Company OVS which is in the BusinessPartner subsection of the publicovs folder, which may negate having to have the extra field --- however I was experiencing issues using that, so I'm playing it safe for now. If this solution doesn't work on the customer's system in the standard screen I'll just take it up with SAP. Thanks all for your help! -
Filtering out rows based on field value
Hello,
I have something like this:
create table stuff
avalue varchar2,
anothervalue varchar2,
thirdvalue varchar2,
anumber number
INSERT INTO stuff Values('abc', 'cde', efg', 2);
INSERT INTO stuff Values('abc', 'cde', efgggg', 4);
INSERT INTO stuff Values('abc', 'xxx', efg', 1);
INSERT INTO stuff Values('abc', 'xxx', efgxxx', 2);
INSERT INTO stuff Values('abc', 'yyy', efg', 2);
I would like to recieve the rows with the higest 'anumber'-value, grouped by 'avalue', and 'anothervalue' (but not 'thirdvalue'). So in this example I want row 2, 4 and 5.
Anyone have an idea? I'm thinking a 'order by desc' is not the best way here?select avalue,
anothervalue,
thirdvalue,
anumber
from (
select s.*,
rank() over(partition by avalue,anothervalue order by anumber desc) rnk
from stuff s
where rnk = 1
AVALUE ANOTHERVAL THIRDVALUE ANUMBER
abc cde efgggg 4
abc xxx efgxxx 2
abc yyy efg 2
SQL> SY. -
Change the row colors based on column values in MOSS 2007.
Hi Team,
I am using MOSS 2007 environment. In that I am having one SharePoint list. In that list based on column values rows colors need to change.
Kindly help me anyone on this.
Thanks,
AshokHi Ashok,
Please follow the below link:
http://www.contentmaster.com/sharepoint-2010/conditional-formatting-of-list-views-for-sharepoint-2010-changing-the-font-colour/
http://sharepoint.stackexchange.com/questions/7478/highlight-row-color-based-on-field-values-in-sharepoint-2010-list-view
Best Regards,
Brij K -
Hiding Subform based on another field value which is not in Layout
Hi,
I tried using Formcalc for hiding a subform like below.
if ($record.BLOCK04.GT_ITEM_LEV1_910.DATA[].GT_ITEM_LEV2_910.DATA[].KDMAT == null)
$.presence = "hidden"
endif
My subform is Flowed, Western text
When i run it, its not working..so i hided using context condition like if there is no value in KDMAT, do not pass it to Layout...Now it's working..My problem is, when there is no vaue, it is leaving BLANK LINE in the print out..a gap is there for that row.
Please help me how to avoid the EMPTY/ BLANK LINE??
Thanks in advanceHi,
All my PARENT subforms are Flowed only..still its not working..Yes, I want to print left to right only..
Please help..
I checked REPEAT SUBFORM but not MAX or MIN count..then it's working but it prints 2 times for first item which is wrong.
I am not understanding the behaviour of this..Please help -
Change value of another field based on the value of selectOneRadio
Hello
I need to display one of two city fields based on the value of a radio group. If the value of the radio group is "Yes", then display the non mandatory city field, if the value is "No", then display mandatory city field. Please can someone help me? The code is below
<af:subform id="contactForm3" default="true">
<af:panelForm binding="#{processScope.backing_regDetails.contactPanel3}">
<af:selectOneRadio binding="#{processScope.backing_regDetails.radio1}"
labelAndAccessKey="#{MatrixResource['ContactDetails.inBoroughQuestion']}"
layout="horizontal"
valuePassThru="true"
required="true"
onchange="javascript.refresh;" >
<f:selectItems value="#{processScope.backing_regDetails.items}" />
</af:selectOneRadio>
<af:inputText onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value='0';"
labelAndAccessKey="#{MatrixCommon['Label.SAO']}"
binding="#{processScope.backing_regDetails.houseNameText}"
maximumLength="240"/>
<af:inputText required="true"
onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value=0;"
maximumLength="240"
label="#{MatrixCommon['Label.PAO']}"
binding="#{processScope.backing_regDetails.numberStreetText}"/>
<af:inputText onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value='0';"
maximumLength="240"
labelAndAccessKey="#{MatrixCommon['Label.District']}"
binding="#{processScope.backing_regDetails.districtText}"/>
<af:inputText maximumLength="60"
rendered="#{!backing_regDetails.radio1}"
onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value='0';"
labelAndAccessKey="#{MatrixCommon['Label.TownCity']}"
required="true"
binding="#{processScope.backing_regDetails.cityText}"/>
<af:inputText maximumLength="60"
rendered="#{backing_regDetails.radio1}"
onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value='0';"
labelAndAccessKey="#{MatrixCommon['Label.TownCity']}"
required="false"
binding="#{processScope.backing_regDetails.cityText}"/>
<af:inputText maximumLength="60"
onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value='0';"
labelAndAccessKey="#{MatrixCommon['Label.County']}"
binding="#{processScope.backing_regDetails.countyText}"/>
<af:inputText columns="7"
onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value=0;"
labelAndAccessKey="#{MatrixCommon['Label.Postcode']}"
binding="#{processScope.backing_regDetails.postcodeText}"/>
<af:selectOneChoice onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value=0;"
binding="#{processScope.backing_regDetails.countrySelect}"
value="#{processScope.backing_regDetails.enteredAddress.countryId}"
labelAndAccessKey="#{MatrixCommon['Label.Country']}">
<f:selectItems value="#{backing_regComponents.countryChoiceList}"/>
</af:selectOneChoice>
<af:inputHidden value="#{processScope.backing_regDetails.enteredAddress.locationId}"
binding="#{processScope.backing_regDetails.locationIdHidden}"
id="locationId"/>
</af:panelForm>
</af:subform>Edited by: aademola on Nov 13, 2008 7:35 AM
Edited by: aademola on Nov 13, 2008 7:42 AMHi,
you should be able to apply this example to your 10.1.3 project
see 4.3.2 of http://download.oracle.com/docs/cd/E12839_01/web.1111/b31973/af_lifecycle.htm#CIAHCFJF
Frank -
Subtotal in alv report based on the particular field value
Hi,
As per my requirement, i need to do subtotal of quntity field based on the material number field value in alv report.
Ex: if material number falls 1 to 10 then i need to be calculate and display subtotal qty amount with text " total of the mat1" and if material number falls 11 to 20 then again i need to be claculate and display subtotal qty amount with text "total of the mat2". similarily i need to display the details.
<removed_by_moderator>
Regards
NagendraHi,
Ex: if material number falls 1 to 10 then i need to be calculate and display subtotal qty amount with text " total of the mat1" and if material number falls 11 to 20 then again i need to be claculate and display subtotal qty amount with text "total of the mat2". similarily i need to display the details.
What you can do is in your output table, you will have to create an auxilary field, lets call it as material group (groupid). Now you can do a subtotal on the material group. However the logic to determine what materials belong to which group should be coded. I guess you might be having some logic for that.
So lets say that material 1 to 10 as G1 ( group 1 ) and material 11 to 20 as G2 ( group 2 )
The output of the internal table would be
Groupid matnr ...
1 1
1 2
1 3.....and so on
2 11
2 12
2 13....upto 20.
Now in the fieldcatalog assign an 'X' to the 'dosum' parameter to the field Groupid
In the sort info do the following :
gs_sort-fieldname = 'GROUPID'.
gs_sort-spos = 1.
gs_sort-up = 'X'.
gs_sort-subtot = 'X'. ***CRUCIAL STATEMENT****
append gs_sort to gt_sort.
Now pass all this data to the alv grid function. And you are done.
regards,
Advait -
Is there an easy way to filter a 2-d array based on the values of two of the fields?
Is there an easy way to filter a 2-d array based on the values of one of the fields. In my attached VI the output array has the following format:
TimeStamp Ident Frame Type Bytes Data
10:57:07.621 3AD00016 CAN Data Frame 8 0000000000000000
10:57:07.622 3AD00017 CAN Data Frame 8 000005E000000000
10:57:07.624 3AD00018 CAN Data Frame 8 0000000003300000
10:57:07.625 2DC00000 CAN Data Frame 8 0000000000000000
10:57:07.626 3AD00019 CAN Data Frame 4 0000030000000000
I would like to delete any rows that do not have an "Ident" between the values of 3AD00000 and 3AD0001E. So for the above data the fourth row would be deleted. The only way I can see to do it is to form a 1-d array. Is there a better approach?
Thank you.
Solved!
Go to Solution.
Attachments:
CMM_SN_MULTI.vi 20 KBHi chuck72352,
after you have sorted your data, you can use the InRange Function. Combined with a "search 1D Array" you'll get the range you really want.
Mike
Attachments:
ArraySubset.PNG 25 KB -
I see that you can control which form is used based on security roles, but can you control it based on other field values? I'd like a new record to use a different form until a given status is updated. I have a status of draft and active. So
it would be nice if I could use form1 for those in draft, form2 for those that are active. But I only see where you can control that via the security roles.
I can code all of this via JavaScript, but having the ability to use two separate forms would be nice. Is that even possible.
Best regards,
Jon Gregory RothlanderHello,
Recheck following article - http://gonzaloruizcrm.blogspot.com/2014/11/avoiding-form-reload-when-switching-crm.html
Dynamics CRM MVP/ Technical Evangelist at SlickData LLC
My blog
Maybe you are looking for
-
Unable to open page through apache web server
No one is able to open page through webserver it's giving message You don't have permission to access / on this server. Can any one help.
-
ITunes audio book download error message.
I have purchased audio book "Thunder Below," by Eugene Fluckley the purchase has been approved and completed by Credit card. I began downloading but now keep getting an error message saying cannot download at this time. System is up to date and with
-
IMac 17" Intel CD: display doesn't work
ciao, today when I switched my iMac on the display remained dim, just like if it was off, while everything else worked OK. so the display was black like it was off, but then I noticed that if I looked very carefully I could see the login box and I ma
-
Java Studio Enterprise 8 - Web App Developing question
Hi, I just installed the Sun Java Studio Enterprise 8 one wek ago(self training) and have a basis familiarity with the product, because I'm working in a very important project at work. I read (PDF, links, etc) information but I really have a problem,
-
I can't delete my synced photos!
I accidentally synced my computer photos to my phone and when I tried to delete them, while following apple care instructions, I got stuck when I wasn't able to press the selected folders button on my apple laptop while on iTunes, Please help