Notifications
Announcements
No record found.
how to put values on an option after executing a condition like
IF ("option111"="blanc") THEN option222::"aaa","bbb","ccc","ddd","eee","fff";
this didn't work
*This post is locked for comments
Do you mean to say based on condition you need to fill another option value ?
yes
Hi Sikanav,
Maybe your want something like this:
IF (option111 = option111::valueOption1) THEN BEGIN
option222 := option222::valueOption1;
END;
Regards!
You can use something like, as said by Cristian:
IF (optionA = optionA::valueOption1) THEN BEGIN
optionB := optionB::valueOption1;
or you can use integer values of the sequential list of Strings.
Please refer below link for more information:
https://msdn.microsoft.com/en-us/library/dd355166.aspx
-Yogesh KulkarniPlease verify, if you find answer helpful.
Hey Sikanav,
Either go ahed as recomended by CristianAguerre OR you can to use like this
IF OptionField = 4 Then BEGIN - You can use the Integer value.
Are you trying to modify the table field's data type through coding?
U sure it is possible through coding to set data type of fields?
Abdul.
Although you can use integer number (start from 0), it is recommended to use name value.
For example, "Document Type" option field of "Sales Header" table with values "Quote,Order,Invoice,Credit Memo,Blanket Order,Return Order".
1. For comparing: you want to do something with Invoice (integer number is 2):
- Recommended: IF ("Document Type" = "Document Type"::"Invoice") THEN BEGIN ...
- Not Recommended: IF ("Document Type" = 2) THEN BEGIN ...
2. For assigning: you want to assign Invoice value to Document Type
- Recommended: "Document Type" := "Document Type"::"Invoice";
- Not Recommended: "Document Type" := 2;
3. For Filtering: you want to filter Document Type with Order or Invoice
- Recommended: SETFILTER("Document Type", '%1|%2', "Document Type"::"Order", "Document Type"::"Invoice");
- Not Recommended: SETFILTER("Document Type", '%1|%2', 1, 2);
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
HoangNam 7