Field format properties
Can I change text field's format properties with javascript ?
Yes, you can use JavaScript to set the various event actions using the setAction field method. To set the number format type, you have to set up a Format script and a Keystroke script:
// Format script for
// number, two decimal places
AFNumber_Format(2, 0, 0, 0, "", false);
// Keystroke script
// two decimal places
AFNumber_Keystroke(2, 0, 0, 0, " ", false);
And for a Range validation script:
// Validation script
// In this example, 42 is the minimum
// and 999 is the maximum
AFRange_Validate(true, 42, true, 999);
So the code that sets these field actions might look like:
var f = getField("your_text_field");
f.setAction("Format", "AFNumber_Format\(2, 0, 0, 0, \"\", false\);");
f.setAction("Keystroke", "AFNumber_Keystroke\(2, 0, 0, 0, \"\", false\);");
f.setAction("Validate", "AFRange_Validate\(true, 42, true, 999\);");
You'll have to study these various built-in functions to see how they behave, but this should get you started.
George
Similar Messages
-
Hi everyone ,
I am attaching files from local disk to CRM Opportunity by using method cl_crm_documents=>create_with_file .
I am able to see files in SAP frontend portal , but the problem is some of the fields in properties tab coming blank .
So how to find the NAME and VALUE fields of PROPERTIES structure in create_with_file .
Right now i am passing below fields these ar coming
"-----Filling Properties structure
ls_prop-name = 'KW_RELATIVE_URL'.
ls_prop-value = wa_path-ls_name.
APPEND ls_prop TO lt_prop.
ls_prop-name = 'DESCRIPTION '.
ls_prop-value = 'Strategy paper for action plan1' .
APPEND ls_prop TO lt_prop.
ls_prop-name = 'LANGUAGE'.
ls_prop-value = sy-langu.
APPEND ls_prop TO lt_prop.
but fileds like Attachment Type , Document Status , Line of Business , Business Year and Country of LE are not coming
as i frontend is a CRM custom application to mentain opportunity .
at prasent i am passing attribute Names and default values of these fields to properties structure but then also i am unable to see it in front end.
Please help if anybody knows where to find the NAME and VALUE fields for thse parameters.
Regards
ChetanI used insert statement to populate these fields in table CRMD_KW_DOC_GEN as these are custom fields.
Regards
Chetan -
Hi All,
I'm back already! Learning Flash is beginning to get to me
again so I returned for yet more help!
I've written the following AS code to get tomorrow's date . .
// Calculates today's date and tomorrow's date
var dToday:Date = new Date();
dToday.getDate()
trace("today: " + dToday) //today's date
myD = dToday.getDate() + 100; // plus one day
var dTomorrow:Date = new Date();
dTomorrow.setDate(myD)
trace("new: " + dTomorrow) //tomorrow's date
var strDate:String = new String();
var strDate = String(dTomorrow);
trace("String: " + strDate);
The strDate string returns the following value . . . "Tue Jul
11 16:19:57 GMT+0100 2006".
That is all well and good but I want to convert it into the
following format for comparison with another field . . .
"200607111619" which is basically the same value in the following
format . . . "yyyymmddhhmm".
Does the only way of doing this involve using parsing logic
to break down the original string and then reconstruct it in the
required format using variables from the broken down original
string?
I have tried looking at the Date Field object notes in my
book but it does not give me anything as regards this programming
requirement. The only thing I can find that might suit this purpose
is string parsing logic. Am I right or is there an easier way to
set a date field format?
Any help would as always be much appreciated!
Thanks,
Kevin.I'm working on an application which requires a valid Voucher
Number to proceed. The Voucher number is based on a combination of
'date/time/no of items' (e.g. 20060711095802 which is today at
09:58 (on a 24 hr clock) for 2 (02) items).
As this date this date/time Voucher Number logic is
essentially sequential, in that each subsequent Voucher Number will
be greater than the last good known Voucher Number entered into the
application (which is already stored in a variable field for
comparison). But it must also be less than tomorrow's date, for
which the Voucher Number would always be tomorrow's date (e.g.
20060712 at 00:00 hrs for 00 items, thus giving 20060712000000).
This is the value that I'm trying to ascertain from the date field
logic.
It would thus be really handy for comparison if I could just
format tomorrow's date and time in the format yyyymmddhhmm and just
add '00' to the end of the string.
I don't like the idea of using the milliseconds value as it
will be necessary then to convert the Voucher Number entered to a
date field for comparison. -
In our current implementation we have a Blank page with Text Field [field format Rich Text] on generated PDF Document.
Once the PDF document is generated, user can copy paste content form any word/rtf document to into the Text Field.
Pasted content retains all text formatting [Bold, Italic, Underline, Indentation] except the Table format. Text Field is removing table metadata from the content and converting it into plant text.
Is there anyway to copy paste table structure as it is from word document into Text Field?Hi,
I don't think you can! While you can paste formatted text into the rich text field, the table metadata means nothing to the textfield.
Niall -
View Field Formatting in the Active Studio:
Hi
View Field Formatting in the Active Studio:
I need to format a date type using the Brazilian format: “dd/mm/yyyy”.
How can I create this format? What do I do to show this format?
AlexandreAny ideas?
Thanks
Alexandre -
Whole number field formatted as timezone in CRM 2013 SP1UR1 gives error on saving
Hi,
I added a whole number field formatted as time zone to the appointment form and when I save the record I get an error saying
Crm Exception: Message: An unexpected error occurred., ErrorCode: -2147220970, InnerException: System.InvalidCastException: Unable to cast object of type 'Microsoft.Xrm.Sdk.OptionSetValue' to type 'System.IConvertible'.
This error is coming from the timezone field and only happens when I have data in the field. Has anyone seen this?
Thanks
Rickard Norström Developer CRM-Konsulterna
http://www.crmkonsulterna.se
Swedish Dynamics CRM Forum: http://www.crmforum.se
My Blog: http://rickardnorstrom.blogspot.seMore info, the error occurs on pipeline stage 30 of the Book or Reschedule message and the same thing happens in CRM 2015. I've started a thread on connect with URL
https://connect.microsoft.com/dynamicssuggestions/feedback/details/1128206/crm-2013-sp1ur1-cant-handle-the-timezone-field
This must be rather new because I've tried it in CRM 2011 UR late and it did not occur there, I haven't tried CRM 2013 RTM though so I can't say if it's a CRM 2013 or a CRM 2013 SP1UR1 issue.
BTW, the 2015 org was a complete vanilla so I've pretty much ruled out custom code as a culprit :)
Regards
Rickard Norström Developer CRM-Konsulterna
http://www.crmkonsulterna.se
Swedish Dynamics CRM Forum: http://www.crmforum.se
My Blog: http://rickardnorstrom.blogspot.se -
Invalid field format (screen error) on Table Control
Hello,
When selecting a line or multiple lines on a screen made by me(using a Table Control), I get Invalid field format (screen error). Debugging the code it sends the message when looping the internal table on PAI to check if there were values changed. Is there a reason why this error appears on this?
loop at it_values.
chain.
field pvalues-BEGDA.
module CHANGE_QUEUE.
endchain.
endloop.
Thanks.No need to loop to check whether data is changed after PBO, just check System Field SY-DATAR, it will be set to 'X' if any field was changed.
So the following code is enough;
IF SY-DATAR EQ 'X'.
PERFORM SAVE_DATA.
ENDIF.
Regards
Karthik D -
Error in module program - Invalid field format( screen error )
In the module program i have added 1 input field named gv_pallet of 1 character. while processing the transaction when i put value 1 in this input field and press a button i am getting error ' Invalid field format( screen error ) .
I am not geting any clue whats the eror . can anyone able to tell me the error.
Point will be guranted .
RegardsNo need to loop to check whether data is changed after PBO, just check System Field SY-DATAR, it will be set to 'X' if any field was changed.
So the following code is enough;
IF SY-DATAR EQ 'X'.
PERFORM SAVE_DATA.
ENDIF.
Regards
Karthik D -
Error Invalid field format (screen error) in module pool
Hi
experts i am doing module in whichi had many check boxes on screen and each check box has function code means i want to do some thing else . but as i click the first or any other check box i get a error message
INVALID FIELD FORMAT (SCREEN ERROR).
Can anyody help me with this asnwers will be rewarded points .
regardsDear Farukh,
can you please let me know how have you declared you check boxes.
how did you handle the click or the function codes in the user command module in your PAI.
The declaration of your fucntion codes can be done when you create your screen fields and then they need to be handled in the user command module i.e what you want to do when suppose you click on that particular check box.
Thanks
venugopal -
Invalid field format (screen error)
We are using custom module pool report for displaying information. Information display in Table control which has also Radio button option for the further processing. After unicode conversion we are getting error while accessing the screen as "Invalid field format (screen error)" when user select Radio button. In production environment we are not facing any issue, but in Dev + Qas we have this issue. Nothing is changed as all environment are sync. To solve the issue we re-defined the Radion screen element, but no success we are still getting same error. I am not sure whether it is related to Page Format or something else. Could you please let me know whether anybody faced this issue ? For the information, I already searched on SDN and SNote, but there is no post or SNote
Have you checked if there are overlapping fields on the screen.
I've seen simular errors and usually it was beacuse of some change by SAP that made it so that the defined length of the screen field was suddenly to small.
I'm not saying that this is the case in your situation, but it never hurts to try and change the length of your screen field and see if that resolves the issue.
Arthur -
Hi,
I want to learn more about various Siebel BC and Field User poperties.
Can anybody guide from where can I get the details for the same. Any specific documents or anything.
Thanks :-)Hi,
In the ToolsDevRef pdf you can see the user properties for the following sections:
About User Properties” on page 79
*“About Setting Numbered Instances of a User Property” on page 80*
*“Applet User Properties” on page 80*
*“Business Component User Properties” on page 98*
*“Business Service User Properties” on page 189*
*“Control User Properties” on page 190*
*“Field User Properties” on page 192*
*“Integration Component User Properties” on page 202*
*“Integration Component Field User Properties” on page 204*
*“List Column User Properties” on page 205*
Regards,
Joseph -
Determine Date field format dynamically
Hello friends,
I'm writing some database access code in java. The biggest problem I face is date fields. Because I don't know the date field format (For example, in SQL Sever we can have dd/mm/yy or mm/dd/yy, etc), I can't format dates for insert/update statements.
Is there a way to determine the date field format dynamically? Regardless of database, for ex. MS SQL, Oracle?
Thank you.Hey!
There is a way to do this! The Oracle Database understands SQL92 Syntax. So you can use
- {d ?yyyy-mm-dd?} for date representation,
- {t ?hh:mm:ss?} for time representation,
- {ts ?yyyy-mm-dd hh:mm:ss.f...?} for timestamp rep.
Here is a small example:
// Connect to the database
// You can put a database name after the @ sign in the connection URL.
Connection conn = DriverManager.getConnection
("jdbc:oracle:oci8:@", "scott", "tiger");
// Create a Statement
Statement stmt = conn.createStatement ();
// Select the ename column from the emp table where the hiredate is Jan-23-1982
ResultSet rset = stmt.executeQuery
("SELECT ename FROM emp WHERE hiredate = {d ?1982-01-23?}");
// Iterate through the result and print the employee names
while (rset.next ())
System.out.println (rset.getString (1));I hope this is what you wanted to know! -
WLC "DHCP Option 82 Remote Id field format"
On WLC, does "DHCP Option 82 Remote Id field format" show client hostname on wlc monitor
Hi Jonathan with sub option 2, from your example D is the node identifier.
When seeing the variable per connection type, I would give a safe assumption it is verbose padding the sub type 1.
The verbose pad formatting for the packet should contain
sub option
length
node identifier
port type
interface number
vlan id
For normal pad format it should contain
sub option
length
circuit
length
vlan id
interface number
-Tom
Please mark answered for helpful posts -
We collect telephone numbers on some of our forms. Is there a field formatted for easy entry? Don't see that this is a current feature in the text umber fields.
Hi,
Unfortunately, this option is not available with forms created through Forms Central.
Regards,
Nakul -
hi friends.
im formatting one field which is having 12 characters.
aufk-aufnr.
suppose in csv file if i take more than 12 characters it should display message field format is incorrect.
but the length of the field is 12 characters.
it is not displaying message.
im taking in internal table as
begin of input,
aufnr like aufk-aufnr,
end of input.
begin of input,
aufnr(12),
end of input.
i have tested 2 cases but not working.
please give necessary suggestions.Hi Vijay,
here you are talkin about two different cases altogether. these two are to be handled differently.
one is where your order number is correct but it lacks padding zeros, in that case.
if ( strlen(aufnr) lt 12 ).
call the conversion routine.
elseif (strlen(aufnr) gt 12 ).
write 'format of data is wrong'.
endif.
if the order number is right and there are no padding zeros you need not throw any error in any case. no scenario shall ask you to do that.
after conversion routine is performed and then if the resulting number is not available in the master data table then we should give an error saying that such an order number doesn't exist.
Reward points if this info helped,
Kiran
Maybe you are looking for
-
Error While Writing DOM to a CLOB i.e. xmldom.writeToClob
I am running into error while writng and reading from a clob. The Sample Code is as follows : declare p xmlparser.Parser; doc xmldom.DOMDocument; i_tmp CLOB; i_tmp1 CLOB; i_buffer varchar2(32767); i_amount pls_integer; begin p := xmlParser.NewParser;
-
How to transfer files from a faulty drive to a new mac?
Hi, at the beginning of this year I experienced one of the worst things in my life: my 4 year old macbook air had a kernel panic attack, which resulted in me taking it in for repair at a local computer repair place (since it was out of warranty i too
-
Artwork not updating on iCloud
All my music is up in Apple's cloud, using iTunes Match. These are mostly MP3's that don't match anything in Apple's offerings, and have been uploaded from iTunes on my PC to the iCloud. I recently changed the album art that is embedded into the fil
-
My Macbook Air won't send e-mails
My Macbook air has suddenly stopped sending e-mails, checked my isp settings and are ok
-
User exit with a field in custom z table
hi .. I have a custom z table with a z field in it. This z field is linked with t800d data base table. when a report is executed using this t800d table they want text data from the z field, but it is not displaying . they said the possible solution w